1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-21 10:50:24 +03:00

esx: drop dead code to silence Coverity

Coverity detected that the only way to get to the cleanup label
is if objectSpec had been successfully allocated, so the null
check was dead code.

* src/esx/esx_vi.c (esxVI_LookupObjectContentByType): Drop
redundant null check.
This commit is contained in:
Eric Blake 2011-10-13 16:06:38 -06:00
parent 57d91fca64
commit 1518042bf3

View File

@ -1763,11 +1763,8 @@ esxVI_LookupObjectContentByType(esxVI_Context *ctx,
* Remove values given by the caller from the data structures to prevent
* them from being freed by the call to esxVI_PropertyFilterSpec_Free().
*/
if (objectSpec != NULL) {
objectSpec->obj = NULL;
objectSpec->selectSet = NULL;
}
objectSpec->obj = NULL;
objectSpec->selectSet = NULL;
if (propertySpec != NULL) {
propertySpec->type = NULL;
propertySpec->pathSet = NULL;