From 3482655bbc21d158ed0daaa294c890997238cc23 Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Fri, 19 May 2017 14:43:29 +0800 Subject: migration: fix leak of src file on dst The return path channel is possibly leaked. Fix it. Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/migration.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'migration') 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); } -- cgit v1.2.3