Re: [PATCH] Remove double close of qemu monitor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]