[libvirt] [PATCH] Remove double close of qemu monitor
Eric Blake
eblake at redhat.com
Thu Jan 27 19:21:59 UTC 2011
On 01/27/2011 11:29 AM, Daniel P. Berrange wrote:
> 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 | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 3b937e4..2e8f4f9 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -900,8 +900,6 @@ qemuConnectMonitor(struct qemud_driver *driver, virDomainObjPtr vm)
> qemuDomainObjExitMonitorWithDriver(driver, vm);
>
> error:
> - if (ret < 0)
> - qemuMonitorClose(priv->mon);
ACK.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110127/10e84809/attachment-0001.sig>
More information about the libvir-list
mailing list