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: John Ferlan <jfer...@redhat.com> --- src/storage/storage_backend_logical.c | 2 +- src/storage/storage_backend_zfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c index f0d6f80..167fe58 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -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; } diff --git a/src/storage/storage_backend_zfs.c b/src/storage/storage_backend_zfs.c index 4d04c70..2e6e407 100644 --- a/src/storage/storage_backend_zfs.c +++ b/src/storage/storage_backend_zfs.c @@ -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; } -- 2.5.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list