Migration/colo.c: Fix double close bug when occur COLO failover
authorZhang Chen <chen.zhang@intel.com>
Sun, 3 Mar 2019 14:50:15 +0000 (22:50 +0800)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Wed, 6 Mar 2019 10:49:18 +0000 (10:49 +0000)
In migration_incoming_state_destroy(void) will check the mis->to_src_file
to double close the mis->to_src_file when occur COLO failover.

Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20190303145021.2962-2-chen.zhang@intel.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/colo.c

index 398b239d1c9da96759111bae69c299e08287dcd8..a916dc178cb46de7e91096d2412e2ae612989191 100644 (file)
@@ -872,6 +872,7 @@ out:
     /* Must be called after failover BH is completed */
     if (mis->to_src_file) {
         qemu_fclose(mis->to_src_file);
+        mis->to_src_file = NULL;
     }
     migration_incoming_disable_colo();