提交 08f1c0a9 编写于 作者: P Peter Krempa

virsh-domain: Report errors and don't deref NULL in qemu-agent-command

Check the returned value for NULL and take the cleanup path
appropriately if the API fails.
上级 cdd642ba
......@@ -7739,7 +7739,10 @@ cmdQemuAgentCommand(vshControl *ctl, const vshCmd *cmd)
vshError(ctl, "%s", _("timeout, async and block options are exclusive"));
goto cleanup;
}
result = virDomainQemuAgentCommand(dom, guest_agent_cmd, timeout, flags);
if (!result)
goto cleanup;
if (vshCommandOptBool(cmd, "pretty")) {
char *tmp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册