mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
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: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
4e87164306
commit
5430ee3aa6
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user