qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH RFC 2/7] migration: Fix error leak in multifd_tls_outgoing_handsh


From: Peter Xu
Subject: [PATCH RFC 2/7] migration: Fix error leak in multifd_tls_outgoing_handshake()
Date: Sun, 22 Oct 2023 16:12:06 -0400

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)
-- 
2.41.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]