提交 544c3a1c 编写于 作者: S sun_fan

init: fix codedex

Signed-off-by: Nsun_fan <sun_fan1@hoperun.com>
上级 8a709023
......@@ -70,6 +70,8 @@ static int LoadParamLabels(const char *fileName, SecurityLabelFunc label, void *
FILE *fp = fopen(fileName, "r");
PARAM_CHECK(fp != NULL, return -1, "Open file %s fail", fileName);
SubStringInfo *info = malloc(sizeof(SubStringInfo) * (SUBSTR_INFO_DAC + 1));
PARAM_CHECK(info != NULL, (void)fclose(fp);
return -1, "Failed to malloc for %s", fileName);
char buff[PARAM_BUFFER_SIZE];
int infoCount = 0;
ParamAuditData auditData = {};
......
......@@ -71,6 +71,7 @@ int ReadFileInDir(const char *dirPath, const char *includeExt,
processFile(fileName, context);
}
}
free(fileName);
closedir(pDir);
return 0;
}
......
......@@ -27,7 +27,6 @@
#include "init_service_manager.h"
#ifndef OHOS_LITE
#include "init_param.h"
#include "uv.h"
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册