Re: [PATCH 2/2] Fix reference handling leak on qemuMonitor

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

 



On 06/10/2010 08:17 AM, Daniel P. Berrange wrote:
> The current code pattern requires that callers of qemuMonitorClose
> check for the return value == 0, and if so, set priv->mon = NULL
> and release the reference held on the associated virDomainObjPtr
> 
> The change d84bb6d6a3bd2fdd530184cc9743249ebddbee71 violated that
> requirement, meaning that priv->mon never gets set to NULL, and
> a reference count is leaked on virDomainObjPtr.
> 
> This design was a bad one, so remove the need to check the return
> valueof qemuMonitorClose(). Instead allow registration of a
> callback that's invoked just when the last reference on qemuMonitorPtr
> is released.
> 
> Finally there was a potential reference leak in qemuConnectMonitor
> in the failure path.

Definitely worth cleaning up.

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]