[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] migration: cleanup in error paths in loadvm

From: Dr. David Alan Gilbert (git)
Subject: [Qemu-devel] [PATCH 2/2] migration: cleanup in error paths in loadvm
Date: Fri, 14 Sep 2018 18:04:30 +0100

From: "Dr. David Alan Gilbert" <address@hidden>

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 <address@hidden>
 migration/savevm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/migration/savevm.c b/migration/savevm.c
index 6384cf676d..534f7daf31 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2331,11 +2331,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;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]