From d1591ae3cc9ea2b991cec911447a28c480aed4a2 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Mon, 2 Jan 2012 16:06:56 +0200 Subject: [PATCH] compositor: more cleanup on shutdown Free idle_source, shm, and vertices and indices arrays on compositor shutdown. Fixes some Valgrind errors. Signed-off-by: Pekka Paalanen --- compositor/compositor.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compositor/compositor.c b/compositor/compositor.c index 99f8cbb..b993c1e 100644 --- a/compositor/compositor.c +++ b/compositor/compositor.c @@ -2019,11 +2019,18 @@ wlsc_compositor_shutdown(struct wlsc_compositor *ec) { struct wlsc_output *output, *next; + wl_event_source_remove(ec->idle_source); + /* Destroy all outputs associated with this compositor */ wl_list_for_each_safe(output, next, &ec->output_list, link) output->destroy(output); wlsc_binding_list_destroy_all(&ec->binding_list); + + wl_shm_finish(ec->shm); + + wl_array_release(&ec->vertices); + wl_array_release(&ec->indices); } static int on_term_signal(int signal_number, void *data) -- 2.7.4