commit 94272d9b45 introduced a memory leak in the
postcopy_ram_listen_thread() call.
We need to free the local error object in the if clause as well.

Signed-off-by: Arun Menon <[email protected]>
---
 migration/savevm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/migration/savevm.c b/migration/savevm.c
index 
7b35ec4dd007c6ed494201be8528a9e4f1c13843..f18c6ee659c1b9a005ff8ccfe51875f81d37694b
 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2141,6 +2141,7 @@ static void *postcopy_ram_listen_thread(void *opaque)
                          "bitmaps may be lost, and present migrated dirty "
                          "bitmaps are correctly migrated and valid.",
                          __func__, load_res);
+            error_free(local_err);
             load_res = 0; /* prevent further exit() */
         } else {
             error_prepend(&local_err,

-- 
2.51.0


Reply via email to