Re: [libvirt-glib 3/5] gobject: Fix handle leak on wrapper object creation

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

 



On Tue, Nov 13, 2012 at 6:30 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
> When creating an object wrapping a libvirt object (GVirDomain,
> GVirStoragePool, GVirStorageVol), libvirt-gobject gets a reference
> to a libvirt object to be used as a handle, and then creates the wrapper
> object by calling g_object_new(..., "handle", handle, NULL);
>
> However, the underlying libvirt object is registered as a boxed type
> with the gobject type system, and the handle setter for these object
> calls g_value_dup_boxed, which in turn adds a reference on the libvirt
> handle. Thus we must release the initial ref we hold on the libvirt
> handle after calling g_object_new().

Looks good. ACK.

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124

--
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]