From: SooChan Lim Date: Mon, 21 Jun 2021 01:28:45 +0000 (+0900) Subject: tbm_module: free bo when it is not from hal_surface. X-Git-Tag: accepted/tizen/unified/20210622.125817~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b2c3b9e5d9b94461b02cf4d3bd17a2378aa7bdf;p=platform%2Fcore%2Fuifw%2Flibtbm.git tbm_module: free bo when it is not from hal_surface. This patch fix the memory leak. Change-Id: I60dc2669aadeffdfa286a06108f448f450b43f56 --- 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 */