From: SooChan Lim Date: Thu, 3 May 2018 01:33:58 +0000 (+0900) Subject: bufmgr: unlock the thread when the path is null X-Git-Tag: submit/tizen/20180503.015415~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fcb441e1af214ed52c7b81658e6598529baeeaf7;p=platform%2Fcore%2Fuifw%2Flibtbm.git bufmgr: unlock the thread when the path is null Change-Id: Ief9834ea5f8010b7a72b2a5e9c2a068b1e82e5e4 --- 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);