From 2b2c3b9e5d9b94461b02cf4d3bd17a2378aa7bdf Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Mon, 21 Jun 2021 10:28:45 +0900 Subject: [PATCH] tbm_module: free bo when it is not from hal_surface. This patch fix the memory leak. Change-Id: I60dc2669aadeffdfa286a06108f448f450b43f56 --- src/tbm_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tbm_module.c b/src/tbm_module.c index 9be2702..f59d4c1 100644 --- a/src/tbm_module.c +++ b/src/tbm_module.c @@ -826,7 +826,7 @@ tbm_module_bo_free(tbm_module *module, tbm_bo bo, tbm_backend_bo_data *bo_data, switch (module->type) { case TBM_MODULE_TYPE_HAL_TBM: // call hal_tbm_bo_free when bo is created by tbm_bo_alloc api. - if (get_from_hal_surface) + if (!get_from_hal_surface) hal_tbm_bo_free(bo_data); break; /* LCOV_EXCL_START */ -- 2.34.1