xwm: Fix memory leak
authorScott Moreau <oreaus@gmail.com>
Fri, 23 Mar 2018 19:41:43 +0000 (13:41 -0600)
committerDerek Foreman <derekf@osg.samsung.com>
Tue, 27 Mar 2018 16:00:06 +0000 (11:00 -0500)
commit4d1cd36c9ea041688f92cd8981e43b5fe3b52409
tree88974a936dd88fbfa2e87d2ed8e797e3f5ea4b7c
parent9fe5d5fae9d41bb5f9ec070dbbc0567c738f4141
xwm: Fix memory leak

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@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
xwayland/window-manager.c