[libvirt] [libvirt-glib 2/2] API to save and suspend

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Tue Jan 3 14:30:12 UTC 2012


On Tue, Jan 3, 2012 at 4:11 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
> On Tue, Jan 03, 2012 at 03:06:09PM +0100, Marc-André Lureau wrote:
>> Hi
>>
>> On Fri, Dec 23, 2011 at 8:58 PM, Zeeshan Ali (Khattak)
>> <zeeshanak at gnome.org>wrote:
>>
>> > +    data = g_new0(DomainSavedSuspendData, 1);
>> >
>> +    g_slice_free (DomainSavedSuspendData, data);
>>
>> You are mixing g_new and g_slice, I don't think that's a problem, but
>> that's not consistant and worries me.
>
> Actually, I'm fairly sure that is a serious problem. At the very
> least it will be a memory leak, but it could well cause other
> nasty effects

  It *is* a serious problem, elmarco is just being polite to me. :) I
was supposed to use g_slice_new0() there.


-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124




More information about the libvir-list mailing list