window: destroy window surfaces and title

Plugs leaks from struct window in window_destroy().

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
Pekka Paalanen 2011-12-16 10:09:29 +02:00
parent 51ce95a6eb
commit 5ec6585753
1 changed files with 7 additions and 0 deletions

View File

@ -997,6 +997,13 @@ window_destroy(struct window *window)
wl_shell_surface_destroy(window->shell_surface);
wl_surface_destroy(window->surface);
wl_list_remove(&window->link);
if (window->cairo_surface != NULL)
cairo_surface_destroy(window->cairo_surface);
if (window->pending_surface != NULL)
cairo_surface_destroy(window->pending_surface);
free(window->title);
free(window);
}