Added missing gsource_destroy for tdm source. 70/254770/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Tue, 5 Jan 2021 03:48:17 +0000 (12:48 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Tue, 9 Mar 2021 08:45:04 +0000 (17:45 +0900)
Change-Id: I4ee2813d3f7d19c2ee0467d79931eb54ff259386
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_wl_egl.c

index 4cfb306..76947c6 100644 (file)
@@ -616,8 +616,10 @@ __tpl_wl_egl_display_init(tpl_display_t *display)
        return TPL_ERROR_NONE;
 
 free_display:
-       if (wl_egl_display->thread)
+       if (wl_egl_display->thread) {
+               tpl_gsource_destroy(wl_egl_display->tdm_source);
                tpl_gthread_destroy(wl_egl_display->thread, _thread_fini);
+       }
 
        wl_egl_display->thread = NULL;
        free(wl_egl_display);
@@ -646,6 +648,11 @@ __tpl_wl_egl_display_fini(tpl_display_t *display)
                        wl_egl_display->gsource = NULL;
                }
 
+               if (wl_egl_display->tdm_source && wl_egl_display->tdm_initialized) {
+                       tpl_gsource_destroy(wl_egl_display->tdm_source);
+                       wl_egl_display->tdm_source = NULL;
+               }
+
                if (wl_egl_display->thread) {
                        tpl_gthread_destroy(wl_egl_display->thread, NULL);
                        wl_egl_display->wl_egl_thread = NULL;