diff options
author | Peter Xu <peterx@redhat.com> | 2017-05-19 14:43:29 +0800 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2017-06-01 18:48:58 +0200 |
commit | 3482655bbc21d158ed0daaa294c890997238cc23 (patch) | |
tree | 7d339bd3fc0af2dc8a01caee1b06392c7d8ccf14 /migration | |
parent | 3a011c26bc74ab0fb4b5289a10fff13e46a02e8c (diff) | |
download | qemu-3482655bbc21d158ed0daaa294c890997238cc23.zip |
migration: fix leak of src file on dst
The return path channel is possibly leaked. Fix it.
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/migration.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c index c3218cd4b6..b90e39992e 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -133,6 +133,11 @@ void migration_incoming_state_destroy(void) { struct MigrationIncomingState *mis = migration_incoming_get_current(); + if (mis->to_src_file) { + qemu_fclose(mis->to_src_file); + mis->to_src_file = NULL; + } + qemu_event_destroy(&mis->main_thread_load_event); } |