提交 be9d259e 编写于 作者: J Jonathon Jongsma 提交者: John Ferlan

qemu: Validate arg in qemuAgentErrorComandUnsupported()

Coverity noted that 'reply' can be NULL after calling
qemuAgentCommand().  Avoid dereferencing reply in
qemuAgentErrorComandUnsupported() in that case.
Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
上级 9a99b01f
......@@ -1005,7 +1005,12 @@ static bool
qemuAgentErrorCommandUnsupported(virJSONValuePtr reply)
{
const char *klass;
virJSONValuePtr error = virJSONValueObjectGet(reply, "error");
virJSONValuePtr error;
if (!reply)
return false;
error = virJSONValueObjectGet(reply, "error");
if (!error)
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册