]> Git Repo - qemu.git/commitdiff
migration: Close file on failed migration load
authorDr. David Alan Gilbert <[email protected]>
Mon, 17 Jul 2017 11:09:32 +0000 (12:09 +0100)
committerJuan Quintela <[email protected]>
Tue, 18 Jul 2017 15:36:15 +0000 (17:36 +0200)
Closing the file before exit on a failure allows
the source to cleanup better, especially with RDMA.

Partial fix for https://bugs.launchpad.net/qemu/+bug/1545052

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Message-Id: <20170717110936[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
migration/migration.c

index a0db40d364cc3617d88c0f17af085335b5263da7..8552f54ab4b06724a4e29e4793f3d11b946de7c3 100644 (file)
@@ -348,6 +348,7 @@ static void process_incoming_migration_co(void *opaque)
         migrate_set_state(&mis->state, MIGRATION_STATUS_ACTIVE,
                           MIGRATION_STATUS_FAILED);
         error_report("load of migration failed: %s", strerror(-ret));
+        qemu_fclose(mis->from_src_file);
         exit(EXIT_FAILURE);
     }
     mis->bh = qemu_bh_new(process_incoming_migration_bh, mis);
This page took 0.030027 seconds and 4 git commands to generate.