Remove double close of qemu monitor

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
This commit is contained in:
Daniel P. Berrange 2011-01-27 18:28:15 +00:00
parent 331d7b09a7
commit e85247e7c3

View File

@ -900,8 +900,6 @@ qemuConnectMonitor(struct qemud_driver *driver, virDomainObjPtr vm)
qemuDomainObjExitMonitorWithDriver(driver, vm);
error:
if (ret < 0)
qemuMonitorClose(priv->mon);
return ret;
}