aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
Diffstat (limited to 'migration')
-rw-r--r--migration/migration.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 6a7731de50..d6ae879dc8 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2280,7 +2280,10 @@ out:
*/
if (postcopy_pause_return_path_thread(ms)) {
/* Reload rp, reset the rest */
- rp = ms->rp_state.from_dst_file;
+ if (rp != ms->rp_state.from_dst_file) {
+ qemu_fclose(rp);
+ rp = ms->rp_state.from_dst_file;
+ }
ms->rp_state.error = false;
goto retry;
}