mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
util: fix check for iscsi initiator copy
virStorageSourceInitiatorCopy propagates the return value from VIR_STRDUP, which returns 1 on a successful copy. Only error out on < 0, not non-zero values. Fixes: 9ea3fdc6e90a96e3d7d7aeb9867e8f0a3992b7c6 Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
5f9c062546
commit
cb756a9914
@ -2331,7 +2331,7 @@ virStorageSourceCopy(const virStorageSource *src,
|
||||
!(def->pr = virStoragePRDefCopy(src->pr)))
|
||||
return NULL;
|
||||
|
||||
if (virStorageSourceInitiatorCopy(&def->initiator, &src->initiator))
|
||||
if (virStorageSourceInitiatorCopy(&def->initiator, &src->initiator) < 0)
|
||||
return NULL;
|
||||
|
||||
if (backingChain && src->backingStore) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user