aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/migration.c b/migration.c
index a63596f9a0..2741d979fc 100644
--- a/migration.c
+++ b/migration.c
@@ -85,7 +85,11 @@ void qemu_start_incoming_migration(const char *uri, Error **errp)
void process_incoming_migration(QEMUFile *f)
{
- if (qemu_loadvm_state(f) < 0) {
+ int ret;
+
+ ret = qemu_loadvm_state(f);
+ qemu_fclose(f);
+ if (ret < 0) {
fprintf(stderr, "load of migration failed\n");
exit(0);
}