提交 5430ee3a 编写于 作者: J John Ferlan

storage: No need to check ret after VIR_APPEND_ELEMENT

Generates a false positive for Coverity, but it turns out there's no need
to check ret == -1 since if VIR_APPEND_ELEMENT is successful, the local
vol pointer is cleared anyway.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 4e871643
......@@ -307,7 +307,7 @@ virStorageBackendLogicalMakeVol(char **const groups,
ret = 0;
cleanup:
if (is_new_vol && (ret == -1))
if (is_new_vol)
virStorageVolDefFree(vol);
return ret;
}
......
......@@ -161,7 +161,7 @@ virStorageBackendZFSParseVol(virStoragePoolObjPtr pool,
cleanup:
virStringFreeList(tokens);
virStringFreeList(name_tokens);
if (is_new_vol && (ret == -1))
if (is_new_vol)
virStorageVolDefFree(volume);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册