From: Peter Krempa Date: Tue, 11 Dec 2012 10:59:58 +0000 (+0100) Subject: qemu: snapshot: Don't leak XML definition if restarting of CPUs fails X-Git-Tag: v1.0.1-rc1~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5b2828763e104b7bd003a01c305cce7b93376f4;p=thirdparty%2Flibvirt.git qemu: snapshot: Don't leak XML definition if restarting of CPUs fails 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. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 10f90aaac4..59b0df9502 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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) {