tbm_module: fix MEAMORY_LEAK.EX
[platform/core/uifw/libtbm.git] / include / tbm_log.h
index d37c351..d133933 100644 (file)
@@ -149,6 +149,14 @@ void tbm_log_print_stdout(int level, const char *fmt, ...);
        } \
 }
 
+#define TBM_GOTO_VAL_SET_ERR_IF_FAIL(cond, val, error, error_type) {\
+       if (!(cond)) {\
+               TBM_ERR("'%s' failed.\n", #cond);\
+               error = error_type;\
+               goto val;\
+       } \
+}
+
 #ifdef __cplusplus
 }
 #endif