]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: snapshot: Don't leak XML definition if restarting of CPUs fails
authorPeter Krempa <pkrempa@redhat.com>
Tue, 11 Dec 2012 10:59:58 +0000 (11:59 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 11 Dec 2012 12:48:15 +0000 (13:48 +0100)
In case the snapshot code isn't able to restart CPUs after an external
checkpoint we would leak a copy of the domains XML definition. This
patch fixes the cleanup path.

src/qemu/qemu_driver.c

index 10f90aaac4988ff9fcca061273161f1fd87f9c45..59b0df95021124878666b288d628a190a2a391a4 100644 (file)
@@ -11494,7 +11494,8 @@ endjob:
                            _("resuming after snapshot failed"));
         }
 
-        return -1;
+        ret = -1;
+        goto cleanup;
     }
     if (vm && thaw != 0 &&
         qemuDomainSnapshotFSThaw(driver, vm, thaw > 0) < 0) {