diff mbox series

[08/12] migration/colo: Plug memleaks in colo_process_incoming_thread

Message ID 20200814160241.7915-9-pannengyuan@huawei.com
State New
Headers show
Series fix some error memleaks | expand

Commit Message

Pan Nengyuan Aug. 14, 2020, 4:02 p.m. UTC
'local_err' forgot to free in colo_process_incoming_thread error path.
Fix that.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
---
Cc: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
Cc: Juan Quintela <quintela@redhat.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
---
 migration/colo.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/migration/colo.c b/migration/colo.c
index ea7d1e9d4e..17b5afc6b5 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -870,6 +870,7 @@  void *colo_process_incoming_thread(void *opaque)
     replication_start_all(REPLICATION_MODE_SECONDARY, &local_err);
     if (local_err) {
         qemu_mutex_unlock_iothread();
+        error_report_err(local_err);
         goto out;
     }
 #else
@@ -882,6 +883,7 @@  void *colo_process_incoming_thread(void *opaque)
     colo_send_message(mis->to_src_file, COLO_MESSAGE_CHECKPOINT_READY,
                       &local_err);
     if (local_err) {
+        error_report_err(local_err);
         goto out;
     }