From: Pekka Paalanen Date: Mon, 2 Jan 2012 14:00:24 +0000 (+0200) Subject: shell: destroy desktop_shell client on exit X-Git-Tag: 0.85.0~124^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9cf5cc882d73b7b5dcd698a2da65869be889439d;p=platform%2Fupstream%2Fweston.git shell: destroy desktop_shell client on exit If the compositor is shutting down while the desktop_shell still exists, we leaked some resources by not destroying the client record. Call wl_client_destroy() on the desktop_shell client, if it exists during shutdown. Fixes some Valgrind errors. Signed-off-by: Pekka Paalanen --- diff --git a/compositor/shell.c b/compositor/shell.c index 0f44add..4ff5306 100644 --- a/compositor/shell.c +++ b/compositor/shell.c @@ -1238,6 +1238,9 @@ shell_destroy(struct wlsc_shell *base) { struct wl_shell *shell = container_of(base, struct wl_shell, shell); + if (shell->child.client) + wl_client_destroy(shell->child.client); + free(shell->screensaver.path); free(shell); } @@ -1296,9 +1299,6 @@ shell_init(struct wlsc_compositor *ec) wlsc_compositor_add_binding(ec, 0, BTN_LEFT, 0, click_to_activate_binding, ec); - - - ec->shell = &shell->shell; return 0;