mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 02:11:19 -04:00
修改src/create_pcid.c文件,消除主干代码安全告警
506行freePcidJsonInfo异常后freePcidJsonInfo.sysCapObj 变量重新赋值为0,防止内存资源泄漏 Signed-off-by: tongkai0808fh <tongkai5@huawei.com>
This commit is contained in:
@@ -504,6 +504,7 @@ int32_t DecodePCID(char *inputFile, char *outDirPath)
|
||||
freePcidJsonInfo.sysCapObj = cJSON_CreateObject();
|
||||
ret = CheckSysCapObj(freePcidJsonInfo, pcidMain, contextBufLen, ret);
|
||||
if (freePcidJsonInfo.flag == -1) {
|
||||
freePcidJsonInfo.sysCapObj = NULL;
|
||||
return FreeAfterDecodePCID(freePcidJsonInfo, FREE_DECODE_PCID_CONTEXT_OUT, ret);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user