summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSooChan Lim <sc1.lim@samsung.com>2021-06-17 10:37:16 +0900
committerSooChan Lim <sc1.lim@samsung.com>2021-06-17 10:37:16 +0900
commit10f83d0855a16bef0c8158168ae07c72dde8e6a0 (patch)
tree4614b7dd6815f756cbdfbaccc13a7b20fdcfc0aa
parent1014618a8cdb150543df22d245d95825522ff540 (diff)
downloadlibtbm-dumb-10f83d0855a16bef0c8158168ae07c72dde8e6a0.tar.gz
libtbm-dumb-10f83d0855a16bef0c8158168ae07c72dde8e6a0.tar.bz2
libtbm-dumb-10f83d0855a16bef0c8158168ae07c72dde8e6a0.zip
fix the resource leak
Change-Id: Ia93a60b11846958acfb1aa1e128cdd1263d60dee
-rw-r--r--src/libhal-backend-tbm-dumb/tbm_backend_dumb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libhal-backend-tbm-dumb/tbm_backend_dumb.c b/src/libhal-backend-tbm-dumb/tbm_backend_dumb.c
index 9eeb0a6..b313a90 100644
--- a/src/libhal-backend-tbm-dumb/tbm_backend_dumb.c
+++ b/src/libhal-backend-tbm-dumb/tbm_backend_dumb.c
@@ -1527,6 +1527,8 @@ fail_alloc_bufmgr_funcs:
fail_get_cap:
if (backend_data->drm_info.is_master)
close(bufmgr_data->fd);
+ else
+ close(drm_fd);
fail_open_drm:
free(bufmgr_data);
fail_alloc_bufmgr_data: