From 5ec658575333e9229f7a5e91d7581289ffb9fc0f Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 16 Dec 2011 10:09:29 +0200 Subject: [PATCH] window: destroy window surfaces and title Plugs leaks from struct window in window_destroy(). Signed-off-by: Pekka Paalanen --- clients/window.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clients/window.c b/clients/window.c index f0a90a7a..3f6dafcd 100644 --- a/clients/window.c +++ b/clients/window.c @@ -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); }