[Spice-devel] [PATCH spice-gtk] file xfer: Fix segfault when rebooting

Eduardo Lima (Etrunko) etrunko at redhat.com
Mon Nov 9 09:08:48 PST 2015


On 11/05/2015 07:37 PM, Jonathon Jongsma wrote:

>>>          g_file_read_async(files[i],
>>>                            G_PRIORITY_DEFAULT,
>>>                            cancellable,
>>>                            file_xfer_read_async_cb,
>>> -                          task);
>>> +                          g_object_ref(task));
>>
>> This looks like it will leak. There is now 2 refs, right? where are
>> the corresponding 2 unrefs? I count one with the hash table.
> 
> 
> There's still the unref that was originally freeing the task: in
> file_xfer_close_cb()
> 
> 

ACK, the g_hash_table_remove() call will do the remaining g_object_unref().

-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko at redhat.com


More information about the Spice-devel mailing list