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

virsh: don't call virSecretFree on NULL

Since the refactoring in fbe2d494 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
上级 2d73f212
......@@ -117,7 +117,8 @@ cmdSecretDefine(vshControl *ctl, const vshCmd *cmd)
cleanup:
VIR_FREE(buffer);
virSecretFree(res);
if (res)
virSecretFree(res);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册