summaryrefslogtreecommitdiffstats
path: root/migration
diff options
context:
space:
mode:
authorDr. David Alan Gilbert2018-09-14 19:04:30 +0200
committerDr. David Alan Gilbert2018-09-26 18:29:01 +0200
commit096c83b7219c5a2145435afc8be750281e9cb447 (patch)
treec6a527affab8aa251278b3638d92221f38724229 /migration
parentmigration/postcopy: Clear have_listen_thread (diff)
downloadqemu-096c83b7219c5a2145435afc8be750281e9cb447.tar.gz
qemu-096c83b7219c5a2145435afc8be750281e9cb447.tar.xz
qemu-096c83b7219c5a2145435afc8be750281e9cb447.zip
migration: cleanup in error paths in loadvm
There's a couple of error paths in qemu_loadvm_state which happen early on but after we've initialised the load state; that needs to be cleaned up otherwise we can hit asserts if the state gets reinitialised later. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20180914170430.54271-3-dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/savevm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/migration/savevm.c b/migration/savevm.c
index d35e87b88c..2d10e45582 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2333,11 +2333,13 @@ int qemu_loadvm_state(QEMUFile *f)
if (migrate_get_current()->send_configuration) {
if (qemu_get_byte(f) != QEMU_VM_CONFIGURATION) {
error_report("Configuration section missing");
+ qemu_loadvm_state_cleanup();
return -EINVAL;
}
ret = vmstate_load_state(f, &vmstate_configuration, &savevm_state, 0);
if (ret) {
+ qemu_loadvm_state_cleanup();
return ret;
}
}