Make sure not to fall through on error in loadvm
authorAnthony Liguori <aliguori@us.ibm.com>
Fri, 1 May 2009 14:36:03 +0000 (09:36 -0500)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 1 May 2009 15:03:18 +0000 (10:03 -0500)
This is from the KVM tree

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

savevm.c

index c15db9a..8b7909a 100644 (file)
--- a/savevm.c
+++ b/savevm.c
@@ -855,6 +855,7 @@ static int qemu_loadvm_state_v2(QEMUFile *f)
             if (ret < 0) {
                 fprintf(stderr, "qemu: warning: error while loading state for instance 0x%x of device '%s'\n",
                         instance_id, idstr);
+                return ret;
             }
         }
         /* always seek to exact end of record */