Coverity noted that 'reply' can be NULL after calling
qemuAgentCommand(). Avoid dereferencing reply in
qemuAgentErrorComandUnsupported() in that case.
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
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;