From: Michal Privoznik Date: Mon, 28 Jan 2013 14:13:27 +0000 (+0100) Subject: qemu: Destroy domain on decompression binary error X-Git-Tag: v1.0.2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93e5a1432d1304fafde4b2186cef63692f171c57;p=thirdparty%2Flibvirt.git qemu: Destroy domain on decompression binary error https://bugzilla.redhat.com/show_bug.cgi?id=894723 Currently, if qemuProcessStart() succeeds, but it's decompression binary that returns nonzero status, we don't kill the qemu process, but remove it from internal domain list, leaving the qemu process hanging around totally uncontrolled. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 13bf854228..812bf95ee8 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4922,8 +4922,10 @@ qemuDomainSaveImageStartVM(virConnectPtr conn, VIR_FORCE_CLOSE(*fd); } - if (virCommandWait(cmd, NULL) < 0) + if (virCommandWait(cmd, NULL) < 0) { + qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, 0); ret = -1; + } } VIR_FORCE_CLOSE(intermediatefd);