未验证 提交 1c4aa380 编写于 作者: O openharmony_ci 提交者: Gitee

!406 FIX: 异常分支添加va_end处理

Merge pull request !406 from 熊磊/Re_0310
......@@ -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.
先完成此消息的编辑!
想要评论请 注册