fix leak of acquire fence fd 05/257005/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Fri, 16 Apr 2021 09:04:25 +0000 (18:04 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 16 Apr 2021 09:04:25 +0000 (18:04 +0900)
Change-Id: Iac6c9f8d770e5f32ae22764e7867c6cbfd895845

src/libhal-backend-tdm-vc4/tdm_vc4_hwc_window.c
src/libtdm-vc4/tdm_vc4_hwc_window.c

index c67312e..84100d6 100644 (file)
@@ -41,6 +41,9 @@ vc4_hwc_window_destroy(hal_tdm_hwc_window *hwc_window)
 
        TDM_BACKEND_RETURN_IF_FAIL(hwc_window_data != NULL);
 
+       if (hwc_window_data->acquire_fence >= 0)
+               close(hwc_window_data->acquire_fence);
+
        LIST_DEL(&hwc_window_data->link);
 
        free(hwc_window_data);
index ae16635..6cfc80c 100644 (file)
@@ -41,6 +41,9 @@ vc4_hwc_window_destroy(tdm_hwc_window *hwc_window)
 
        RETURN_IF_FAIL(hwc_window_data != NULL);
 
+       if (hwc_window_data->acquire_fence >= 0)
+               close(hwc_window_data->acquire_fence);
+
        LIST_DEL(&hwc_window_data->link);
 
        free(hwc_window_data);