[PATCH] qemu: reset await_event in all error paths in qemuAgentCommand

Nikolay Shirokovskiy posted 1 patch 2 weeks ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1584688583-189965-1-git-send-email-nshirokovskiy@virtuozzo.com
src/qemu/qemu_agent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] qemu: reset await_event in all error paths in qemuAgentCommand

Posted by Nikolay Shirokovskiy 2 weeks ago
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>
---
 src/qemu/qemu_agent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index 9ea2c59..6ff5b11 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -1113,7 +1113,7 @@ qemuAgentCommand(qemuAgentPtr agent,
     }
 
     if (qemuAgentGuestSync(agent) < 0)
-        return -1;
+        goto cleanup;
 
     if (!(cmdstr = virJSONValueToString(cmd, false)))
         goto cleanup;
-- 
1.8.3.1


Re: [PATCH] qemu: reset await_event in all error paths in qemuAgentCommand

Posted by Michal Prívozník 2 weeks ago
On 20. 3. 2020 8:16, Nikolay Shirokovskiy wrote:
> 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>
> ---
>  src/qemu/qemu_agent.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
> index 9ea2c59..6ff5b11 100644
> --- a/src/qemu/qemu_agent.c
> +++ b/src/qemu/qemu_agent.c
> @@ -1113,7 +1113,7 @@ qemuAgentCommand(qemuAgentPtr agent,
>      }
>  
>      if (qemuAgentGuestSync(agent) < 0)
> -        return -1;
> +        goto cleanup;
>  
>      if (!(cmdstr = virJSONValueToString(cmd, false)))
>          goto cleanup;
> 

Ooops :-)

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

and pushed.

Michal