[PATCH v3] xwm: Fix memory leak

Derek Foreman derekf at osg.samsung.com
Tue Mar 27 16:04:47 UTC 2018


On 2018-03-26 08:36 AM, Pekka Paalanen wrote:
> On Fri, 23 Mar 2018 15:07:07 -0500
> Derek Foreman <derekf at osg.samsung.com> wrote:
> 
>> On 2018-03-23 02:41 PM, Scott Moreau wrote:
>>> A memory leak introduced by 6b58ea8c led to me finding a bigger leak,
>>> which is xwm was calling frame_create() without calling frame_destroy().
>>> This meant that the associated icon_surface was not being destroyed,
>>> leaving the destroy handler for it broken. Here we fix this by calling
>>> frame_destroy() when the window is destroyed and free the reply in
>>> the icon_surface destroy handler.  
>>
>> Reviewed-by: Derek Foreman <derekf at osg.samsung.com>
>>
>> Though, I guess this should probably be split into two, in case the icon
>> stuff needs to be pulled before the RC.
>>
>> I can do that when I land it though.

I didn't bother splitting it, and have landed it now.

Thanks,
Derek

>> Will wait on this a little longer to see if anyone else wants to review.
>>  Looks trivially correct to me, but xwm has tricked me before.
> 
> Hi,
> 
> it looks reasonable to me too, so
> Acked-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> split or unsplit.
> 
>>> ---
>>>
>>> Changed in v2:
>>>
>>> - Setup destroy handler to free reply when surface is destroyed
>>> - Call frame_destroy() for window->frame
>>>
>>> Changed in v3:
>>>
>>> - Fix whitespace
>>> - Drop unnecessary cast in handle_icon_surface_destroy()
>>>
>>>  xwayland/window-manager.c | 21 +++++++++++++++++++--
>>>  1 file changed, 19 insertions(+), 2 deletions(-)
> 
> Thanks,
> pq
> 
> 
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 



More information about the wayland-devel mailing list