]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: reset await_event in all error paths in qemuAgentCommand
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Fri, 20 Mar 2020 07:16:23 +0000 (10:16 +0300)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 20 Mar 2020 08:23:05 +0000 (09:23 +0100)
A fixup to patch [1]. We need to reset await_event in all
error paths.

[1] 52532073d : qemu: remove redundant needReply argument of qemuAgentCommand

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_agent.c

index 9ea2c595635b2b0c02c601d2306bf44d2459dfa8..6ff5b11374b566af61c2da6474becc788d8ad46a 100644 (file)
@@ -1113,7 +1113,7 @@ qemuAgentCommand(qemuAgentPtr agent,
     }
 
     if (qemuAgentGuestSync(agent) < 0)
-        return -1;
+        goto cleanup;
 
     if (!(cmdstr = virJSONValueToString(cmd, false)))
         goto cleanup;