[weston,2/3] ivi-shell: Remove the compositor destory listener from list during de-init

Submitted by Harsha Manjula Mallikarjun (RBEI/ECF3) on Aug. 7, 2018, 1:35 p.m.

Details

Message ID 1533648904-31286-3-git-send-email-harsha.manjulamallikarjun@in.bosch.com
State Accepted
Commit 46cbd0a7f5271cd0832e6d8687829844f40f89cd
Headers show
Series "Fix invalid memory access during de-init" ( rev: 1 ) in Wayland

Not browsing as part of any series.

Commit Message

Harsha Manjula Mallikarjun (RBEI/ECF3) Aug. 7, 2018, 1:35 p.m.
During de-init ensure removal of compositor destroy notification
from list. Otherwise a dongling pointer is left behind which will
affect other plugins.

Signed-off-by: Harsha M M <harsha.manjulamallikarjun@in.bosch.com>
---
 ivi-shell/ivi-shell.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
index 0235d26..58f53bc 100644
--- a/ivi-shell/ivi-shell.c
+++ b/ivi-shell/ivi-shell.c
@@ -358,6 +358,8 @@  shell_destroy(struct wl_listener *listener, void *data)
 		container_of(listener, struct ivi_shell, destroy_listener);
 	struct ivi_shell_surface *ivisurf, *next;
 
+	wl_list_remove(&shell->destroy_listener.link);
+
 	text_backend_destroy(shell->text_backend);
 	input_panel_destroy(shell);