All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] migration: release MigrationIncomingState in migration_object_finalize
@ 2018-07-18  8:15 Lidong Chen
  0 siblings, 0 replies; only message in thread
From: Lidong Chen @ 2018-07-18  8:15 UTC (permalink / raw)
  To: quintela, dgilbert; +Cc: qemu-devel, Lidong Chen

Qemu initialize the MigrationIncomingState structure in migration_object_init,
but not release it. this patch release it in migration_object_finalize.

Signed-off-by: Lidong Chen <lidongchen@tencent.com>
---
 migration/migration.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/migration/migration.c b/migration/migration.c
index 8d56d56930..37048d9dad 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -161,6 +161,12 @@ void migration_object_init(void)
 void migration_object_finalize(void)
 {
     object_unref(OBJECT(current_migration));
+
+    qemu_sem_destroy(&current_incoming->postcopy_pause_sem_fault);
+    qemu_sem_destroy(&current_incoming->postcopy_pause_sem_dst);
+    qemu_event_destroy(&current_incoming->main_thread_load_event);
+    qemu_mutex_destroy(&current_incoming->rp_mutex);
+    g_free(current_incoming);
 }
 
 /* For outgoing */
-- 
2.15.2 (Apple Git-101.1)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-18  8:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-18  8:15 [Qemu-devel] [PATCH v2] migration: release MigrationIncomingState in migration_object_finalize Lidong Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.