提交 1518042b 编写于 作者: E Eric Blake

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.
上级 57d91fca
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册