summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChangyeon Lee <cyeon.lee@samsung.com>2021-04-16 18:04:25 +0900
committerChangyeon Lee <cyeon.lee@samsung.com>2021-04-16 18:04:25 +0900
commitb7a6f790d710ab8cd0ee1807ba3aa23a96f86708 (patch)
treed0dbf8ac294c28ef992241e1fb1b58f441ba4bb5
parent8fd9f238aae412667dd0b9715f2293a2aee03a17 (diff)
downloadlibtdm-vc4-b7a6f790d710ab8cd0ee1807ba3aa23a96f86708.tar.gz
libtdm-vc4-b7a6f790d710ab8cd0ee1807ba3aa23a96f86708.tar.bz2
libtdm-vc4-b7a6f790d710ab8cd0ee1807ba3aa23a96f86708.zip
fix leak of acquire fence fd
Change-Id: Iac6c9f8d770e5f32ae22764e7867c6cbfd895845
-rw-r--r--src/libhal-backend-tdm-vc4/tdm_vc4_hwc_window.c3
-rw-r--r--src/libtdm-vc4/tdm_vc4_hwc_window.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/libhal-backend-tdm-vc4/tdm_vc4_hwc_window.c b/src/libhal-backend-tdm-vc4/tdm_vc4_hwc_window.c
index c67312e..84100d6 100644
--- a/src/libhal-backend-tdm-vc4/tdm_vc4_hwc_window.c
+++ b/src/libhal-backend-tdm-vc4/tdm_vc4_hwc_window.c
@@ -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);
diff --git a/src/libtdm-vc4/tdm_vc4_hwc_window.c b/src/libtdm-vc4/tdm_vc4_hwc_window.c
index ae16635..6cfc80c 100644
--- a/src/libtdm-vc4/tdm_vc4_hwc_window.c
+++ b/src/libtdm-vc4/tdm_vc4_hwc_window.c
@@ -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);