mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 02:11:19 -04:00
当freePcidInfo.priSyscapFull == NULL时,不应再调用该free方法
Signed-off-by: liutuantuan <liutuantuan1@huawei.com>
This commit is contained in:
+1
-1
@@ -897,7 +897,7 @@ int32_t EncodePcidscToString(char *inputFile, char *outDirPath)
|
||||
freePcidInfo.priSyscapFull = (char *)malloc(priSyscapCount * SINGLE_SYSCAP_LEN);
|
||||
if (freePcidInfo.priSyscapFull == NULL) {
|
||||
PRINT_ERR("malloc failed\n");
|
||||
return FreeAfterEncodePCID(freePcidInfo, FREE_ENCODE_PCID_PRISYSCAP_FULL_OUT, ret);
|
||||
return FreeAfterEncodePCID(freePcidInfo, FREE_ENCODE_PCID_CONTEXT_OUT, ret);
|
||||
}
|
||||
(void)memset_s(freePcidInfo.priSyscapFull, priSyscapCount * SINGLE_SYSCAP_LEN,
|
||||
0, priSyscapCount * SINGLE_SYSCAP_LEN);
|
||||
|
||||
Reference in New Issue
Block a user