From d2b9b5d1ccff5934f2c75ca2dad64d6ff8f4f790 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Wed, 6 Nov 2019 12:07:23 +0200 Subject: [PATCH] ivi-shell: fix init error path This was forgetting to remove the compositor destroy listener if init failed, which would lead to use-after-free on compositor tear-down. Found by inspection. Signed-off-by: Pekka Paalanen --- ivi-shell/ivi-shell.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c index 244290b8..99431d0b 100644 --- a/ivi-shell/ivi-shell.c +++ b/ivi-shell/ivi-shell.c @@ -649,6 +649,7 @@ err_desktop: weston_desktop_destroy(shell->desktop); err_shell: + wl_list_remove(&shell->destroy_listener.link); free(shell); return IVI_FAILED;