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@xxxxxxxxxx> --- src/util/virstoragefile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index e04cc413a4..acf26721e7 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -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) { -- 2.21.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list