ivi-shell: Remove the compositor destory listener from list during de-init
authorHarsha M M <harsha.manjulamallikarjun@in.bosch.com>
Tue, 7 Aug 2018 13:35:03 +0000 (19:05 +0530)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 10 Aug 2018 10:23:14 +0000 (13:23 +0300)
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>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
ivi-shell/ivi-shell.c

index 0235d26..58f53bc 100644 (file)
@@ -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);