wl_egl: close fence_fd when gsource finalized 00/296000/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Tue, 11 Jul 2023 06:33:48 +0000 (15:33 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Tue, 18 Jul 2023 06:04:59 +0000 (15:04 +0900)
commite341d24b6aa53bad116bb665383f973c93870a52
tree5479ff5d16d0a3b16090e6cafe2fb4816aa6a8da
parentb6ba6f666cb85f06ba9c92a8ec7fc69d7ea9427a
wl_egl: close fence_fd when gsource finalized

 - Even though when main thread have called tpl_gsource_destroy for
  fence_waiting_source, which has not yet signaled, gsource may not be
  completely destroyed because it might be in dispatch queue in g_main_context.

 - In this case, if the fence_waiting_source is dispatched, it can try
  to commit with the invalid wl_egl_buffer that has already been freed.

 - This commit makes to prevent operating with an invalid wl_egl_buffer
  and to close fence_fd properly.

Change-Id: I6ff30925f1bed6806017d408bf1bf067eab6624b
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_utils_gthread.c
src/tpl_wl_egl_thread.c