[PATCH v3] xwm: Fix memory leak

Pekka Paalanen ppaalanen at gmail.com
Mon Mar 26 13:36:05 UTC 2018


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.
> 
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180326/a1bd0294/attachment.sig>


More information about the wayland-devel mailing list