summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChangyeon Lee <cyeon.lee@samsung.com>2021-04-08 17:52:38 +0900
committerChangyeon Lee <cyeon.lee@samsung.com>2021-04-08 18:04:07 +0900
commit87fc3fa10a42594ed018346105c761971026a1a3 (patch)
tree193dfedb011c899e116c0e5a919de2070c9f9202
parentc9deb29166723207883c78750e4cc928df4271bf (diff)
downloadlibtbm-vigs-87fc3fa10a42594ed018346105c761971026a1a3.tar.gz
libtbm-vigs-87fc3fa10a42594ed018346105c761971026a1a3.tar.bz2
libtbm-vigs-87fc3fa10a42594ed018346105c761971026a1a3.zip
Fix memory leak
Change-Id: I786d91b21b6833c1893d240618b7e5f834b7813a
-rw-r--r--src/libhal-backend-tbm-vigs/tbm_backend_vigs.c2
-rwxr-xr-xsrc/libtbm-vigs/tbm_bufmgr_vigs.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/libhal-backend-tbm-vigs/tbm_backend_vigs.c b/src/libhal-backend-tbm-vigs/tbm_backend_vigs.c
index 011a4fe..5da64ad 100644
--- a/src/libhal-backend-tbm-vigs/tbm_backend_vigs.c
+++ b/src/libhal-backend-tbm-vigs/tbm_backend_vigs.c
@@ -616,6 +616,8 @@ tbm_vigs_bo_free(hal_tbm_bo *bo)
TBM_BACKEND_ERR("Cannot find bo_data to Hash(%d), ret=%d\n", bo_data->sfc->gem.name, ret);
vigs_drm_gem_unref(&sfc->gem);
+
+ free(bo_data);
}
static int
diff --git a/src/libtbm-vigs/tbm_bufmgr_vigs.c b/src/libtbm-vigs/tbm_bufmgr_vigs.c
index bceb59b..bb21434 100755
--- a/src/libtbm-vigs/tbm_bufmgr_vigs.c
+++ b/src/libtbm-vigs/tbm_bufmgr_vigs.c
@@ -650,6 +650,8 @@ tbm_vigs_bo_free(tbm_backend_bo_data *bo_data)
TBM_ERR("Cannot find bo_vigs to Hash(%d), ret=%d\n", sfc->gem.name, ret);
vigs_drm_gem_unref(&sfc->gem);
+
+ free(bo_vigs);
}
static int