bufmgr: unlock the thread when the path is null 80/177680/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 3 May 2018 01:33:58 +0000 (10:33 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Thu, 3 May 2018 01:33:58 +0000 (10:33 +0900)
Change-Id: Ief9834ea5f8010b7a72b2a5e9c2a068b1e82e5e4

src/tbm_bufmgr.c

index d8978e6..962fbb6 100644 (file)
@@ -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);