aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2020-09-08 16:30:17 -0400
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-09-25 11:11:01 +0100
commitc02039a6f3730ddcf683a0ba9a175688c6db71a0 (patch)
tree6e35e75861b5e76135f317cfce6032d5696eb208 /migration
parent8c1c07929feae876202ba26f07a540c5115c18cd (diff)
downloadqemu-c02039a6f3730ddcf683a0ba9a175688c6db71a0.zip
qemu-c02039a6f3730ddcf683a0ba9a175688c6db71a0.tar.gz
qemu-c02039a6f3730ddcf683a0ba9a175688c6db71a0.tar.bz2
migration: Properly destroy variables on incoming side
In migration_incoming_state_destroy(), we've got a few variables that aren't destroyed properly, namely: main_thread_load_event postcopy_pause_sem_dst postcopy_pause_sem_fault rp_mutex Destroy them properly. Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20200908203022.341615-2-peterx@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/migration.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/migration/migration.c b/migration/migration.c
index d9d1e0b..3495c9e 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -238,12 +238,15 @@ void migration_incoming_state_destroy(void)
mis->postcopy_remote_fds = NULL;
}
- qemu_event_reset(&mis->main_thread_load_event);
-
if (mis->socket_address_list) {
qapi_free_SocketAddressList(mis->socket_address_list);
mis->socket_address_list = NULL;
}
+
+ qemu_event_destroy(&mis->main_thread_load_event);
+ qemu_sem_destroy(&mis->postcopy_pause_sem_dst);
+ qemu_sem_destroy(&mis->postcopy_pause_sem_fault);
+ qemu_mutex_destroy(&mis->rp_mutex);
}
static void migrate_generate_event(int new_state)