e_hwc_windows: clean present sync windows when target window is freed 31/271331/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Fri, 11 Feb 2022 11:49:33 +0000 (20:49 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 18 Feb 2022 02:16:18 +0000 (11:16 +0900)
fix leak sync windows of target window

Change-Id: Iedcbca7dddd290768c71d939cf6183342fc5b98c

src/bin/e_hwc_windows.c

index 1dcf41c9b7c1e7434e3db430d5823fdd53a5061b..7adb68e59f6effde0a56f7951998aad59ec78ab9 100644 (file)
@@ -1757,6 +1757,7 @@ static void
 _e_hwc_windows_target_window_free(E_Hwc_Window_Target *target_hwc_window)
 {
    E_Hwc_Window *hwc_window = (E_Hwc_Window *)target_hwc_window;
+   E_Hwc_Window *present_sync_window;
 
    if (target_hwc_window->evas)
      {
@@ -1779,6 +1780,9 @@ _e_hwc_windows_target_window_free(E_Hwc_Window_Target *target_hwc_window)
    if (target_hwc_window->event_fd >= 0)
      close(target_hwc_window->event_fd);
 
+   EINA_LIST_FREE(target_hwc_window->present_sync_windows, present_sync_window)
+     e_hwc_window_unref(present_sync_window);
+
    if (hwc_window->queue && hwc_window->queue->tqueue)
      tbm_surface_queue_destroy(hwc_window->queue->tqueue);