]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Remove double close of qemu monitor
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 27 Jan 2011 18:28:15 +0000 (18:28 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 28 Jan 2011 11:49:13 +0000 (11:49 +0000)
When qemuMonitorSetCapabilities() fails, there is no need to
call qemuMonitorClose(), because the caller will already see
the error code and tear down the entire VM. The extra call to
qemuMonitorClose resulted in a double-free due to it removing
a ref count prematurely.

* src/qemu/qemu_driver.c: Remove premature close of monitor

src/qemu/qemu_driver.c

index 3d2ba0d4438f0d5a45ef4187e7e20032ea76eace..35e1cd77aa8a4872441ca18e03b2dcfcede273a0 100644 (file)
@@ -900,8 +900,6 @@ qemuConnectMonitor(struct qemud_driver *driver, virDomainObjPtr vm)
     qemuDomainObjExitMonitorWithDriver(driver, vm);
 
 error:
-    if (ret < 0)
-        qemuMonitorClose(priv->mon);
 
     return ret;
 }