mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
virsh: don't call virSecretFree on NULL
Since the refactoring in fbe2d49 we call virSecretFree even if virSecretDefineXML fails, which leads to overwriting the error message with: error: Invalid secret: virSecretFree Bug: https://bugzilla.redhat.com/show_bug.cgi?id=929045
This commit is contained in:
parent
2d73f2120f
commit
bfb4b82257
@ -117,7 +117,8 @@ cmdSecretDefine(vshControl *ctl, const vshCmd *cmd)
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(buffer);
|
||||
virSecretFree(res);
|
||||
if (res)
|
||||
virSecretFree(res);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user