From fcb441e1af214ed52c7b81658e6598529baeeaf7 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Thu, 3 May 2018 10:33:58 +0900 Subject: [PATCH] bufmgr: unlock the thread when the path is null Change-Id: Ief9834ea5f8010b7a72b2a5e9c2a068b1e82e5e4 --- src/tbm_bufmgr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tbm_bufmgr.c b/src/tbm_bufmgr.c index d8978e6..962fbb6 100644 --- a/src/tbm_bufmgr.c +++ b/src/tbm_bufmgr.c @@ -1006,14 +1006,19 @@ tbm_bufmgr_debug_dump_all(char *path) pthread_mutex_lock(&gLock); _tbm_set_last_result(TBM_ERROR_NONE); - TBM_RETURN_VAL_IF_FAIL(path != NULL, 0); + if (!path) { + TBM_ERR("path is null.\n"); + pthread_mutex_unlock(&gLock); + return 0; + } + TBM_DBG("path=%s\n", path); count = _tbm_util_get_max_surface_size(&w, &h); if (count == 0) { TBM_ERR("No tbm_surface.\n"); pthread_mutex_unlock(&gLock); - return 1; + return 0; } tbm_surface_internal_dump_with_scale_start(path, w, h, count, scale_factor); -- 2.7.4