提交 e3077fc7 编写于 作者: X xlei1030

FIX: 异常分支添加va_end处理

Signed-off-by: Nxlei1030 <xionglei6@huawei.com>
上级 fa7f95d3
......@@ -105,6 +105,7 @@ void InitLogInit(const char *outFileName, InitLogLevel logLevel, const char *kLe
if (vsnprintf_s(tmpFmt, MAX_LOG_SIZE, MAX_LOG_SIZE - 1, fmt, vargs) == -1) {
close(g_fd);
g_fd = -1;
va_end(vargs);
return;
}
......@@ -113,6 +114,7 @@ void InitLogInit(const char *outFileName, InitLogLevel logLevel, const char *kLe
kLevel, getpid(), "INIT", LOG_LEVEL_STR[logLevel], tmpFmt) == -1) {
close(g_fd);
g_fd = -1;
va_end(vargs);
return;
}
va_end(vargs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册