From 463ff8e4cf52b2be19876875b76570f1899732f4 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Mon, 4 Sep 2017 16:47:48 +0900 Subject: [PATCH] tpl_wayland_egl_thread: Fixed ref count bug in gsources. - g_source_new() must match g_source_unref(), g_source_attach() must match g_source_destroy(). Change-Id: I5bfe99de2bed6abfbff9f0a61ff20eeb33533048 Signed-off-by: joonbum.ko --- src/tpl_wayland_egl_thread.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index e95bb04..5912b91 100644 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -124,7 +124,6 @@ _twe_thread_loop(gpointer data) if (tdm_source) { g_source_attach(&tdm_source->gsource, g_main_loop_get_context(ctx->twe_loop)); - g_source_unref(&tdm_source->gsource); } _twe_ctx->tdm_source = tdm_source; @@ -681,7 +680,6 @@ _twe_display_del_source_init(twe_thread *thread, source->disp_source = disp_source; g_source_attach(&source->gsource, g_main_loop_get_context(ctx->twe_loop)); - g_source_unref(&source->gsource); return source; } @@ -1642,7 +1640,6 @@ twe_surface_add(twe_thread* thread, g_source_set_callback(&source->gsource, NULL, surface, NULL); g_source_attach(&source->gsource, g_main_loop_get_context(ctx->twe_loop)); - g_source_unref(&source->gsource); TPL_LOG_T("WL_EGL", "gsource(%p) wl_egl_window(%p) wl_surface(%p) event_fd(%d)", -- 2.7.4