[virt-tools-list] [virt-viewer] Fix leak in virt_viewer_session_spice_clear_displays()

Fabiano Fidêncio fabiano at fidencio.org
Tue Apr 7 10:37:13 UTC 2015


On Tue, Apr 7, 2015 at 11:55 AM, Pavel Grunt <pgrunt at redhat.com> wrote:
>>
>> The GList returned by spice_session_get_channels() must be freed
>> after
>> use.
>> ---
>>  src/virt-viewer-session-spice.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/src/virt-viewer-session-spice.c
>> b/src/virt-viewer-session-spice.c
>> index a0acba6..49d224c 100644
>> --- a/src/virt-viewer-session-spice.c
>> +++ b/src/virt-viewer-session-spice.c
>> @@ -102,6 +102,7 @@ static void
>> virt_viewer_session_spice_clear_displays(VirtViewerSessionSpice *sel
>>
>>          g_object_set_data(G_OBJECT(channel), "virt-viewer-displays",
>>          NULL);
>>      }
>> +    g_list_free(channels);
>>      virt_viewer_session_clear_displays(VIRT_VIEWER_SESSION(self));
>>  }
>>
>> --
>> 2.3.4
>>
>
> Ack!
>
> Thanks,
>
> Pavel
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list


Pushed, thanks!


-- 
Fabiano Fidêncio




More information about the virt-tools-list mailing list