提交 cb756a99 编写于 作者: J Ján Tomko

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: 9ea3fdc6Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 5f9c0625
...@@ -2331,7 +2331,7 @@ virStorageSourceCopy(const virStorageSource *src, ...@@ -2331,7 +2331,7 @@ virStorageSourceCopy(const virStorageSource *src,
!(def->pr = virStoragePRDefCopy(src->pr))) !(def->pr = virStoragePRDefCopy(src->pr)))
return NULL; return NULL;
if (virStorageSourceInitiatorCopy(&def->initiator, &src->initiator)) if (virStorageSourceInitiatorCopy(&def->initiator, &src->initiator) < 0)
return NULL; return NULL;
if (backingChain && src->backingStore) { if (backingChain && src->backingStore) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册