From 61851f5c377ba270c57dbce94fff340cea129c19 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 6 Dec 2021 16:59:26 +0000 Subject: [PATCH] content-protection: Don't leak update timer on shutdown If we still have a pending idle timer when the compositor is being destroyed, make sure to free it first. Signed-off-by: Daniel Stone --- libweston/content-protection.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libweston/content-protection.c b/libweston/content-protection.c index 32dc3f06..d732b165 100644 --- a/libweston/content-protection.c +++ b/libweston/content-protection.c @@ -189,6 +189,8 @@ cp_destroy_listener(struct wl_listener *listener, void *data) wl_list_remove(&cp->protected_list); weston_log_scope_destroy(cp->debug); cp->debug = NULL; + if (cp->surface_protection_update) + wl_event_source_remove(cp->surface_protection_update); cp->surface_protection_update = NULL; cp->compositor->content_protection = NULL; free(cp);