diff mbox series

[RFC,2/7] migration: Fix error leak in multifd_tls_outgoing_handshake()

Message ID 20231022201211.452861-3-peterx@redhat.com
State New
Headers show
Series migration/multifd: quit unitifications and separate sync packet | expand

Commit Message

Peter Xu Oct. 22, 2023, 8:12 p.m. UTC
The Error* is leaked when error triggerred.

It logically should have a Fixes here, but since the code changed a few
times, the backport won't be straightforward anyway.  Let's not bother with
leaking an error in the failure path for now.

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 migration/multifd.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Fabiano Rosas Oct. 23, 2023, 2:17 p.m. UTC | #1
Peter Xu <peterx@redhat.com> writes:

> The Error* is leaked when error triggerred.
>
> It logically should have a Fixes here, but since the code changed a few
> times, the backport won't be straightforward anyway.  Let's not bother with
> leaking an error in the failure path for now.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
>  migration/multifd.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/migration/multifd.c b/migration/multifd.c
> index c8bdd88041..4afdd88602 100644
> --- a/migration/multifd.c
> +++ b/migration/multifd.c
> @@ -789,6 +789,7 @@ static void multifd_tls_outgoing_handshake(QIOTask *task,
>      p->quit = true;
>      qemu_sem_post(&multifd_send_state->channels_ready);
>      qemu_sem_post(&p->sem_sync);
> +    error_free(err);
>  }
>  
>  static void *multifd_tls_handshake_thread(void *opaque)

Reviewed-by: Fabiano Rosas <farosas@suse.de>
diff mbox series

Patch

diff --git a/migration/multifd.c b/migration/multifd.c
index c8bdd88041..4afdd88602 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -789,6 +789,7 @@  static void multifd_tls_outgoing_handshake(QIOTask *task,
     p->quit = true;
     qemu_sem_post(&multifd_send_state->channels_ready);
     qemu_sem_post(&p->sem_sync);
+    error_free(err);
 }
 
 static void *multifd_tls_handshake_thread(void *opaque)