update src/create_pcid.c.

Signed-off-by: 严学舟 <yangang20@huawei.com>
This commit is contained in:
严学舟
2024-08-10 02:17:18 +00:00
committed by Gitee
parent c2c5d607f2
commit cfc2137f89
+1 -3
View File
@@ -450,7 +450,6 @@ static int32_t FreeAfterDecodePCID(struct FreeDecodePcidJsonInfo freePcidJsonInf
case FREE_DECODE_PCID_CONVERT_OUT:
free(freePcidJsonInfo.strJson);
cJSON_Delete(freePcidJsonInfo.jsonRootObj);
cJSON_Delete(freePcidJsonInfo.sysCapObj);
FreeContextBuffer(freePcidJsonInfo.contextBuffer);
break;
case FREE_DECODE_PCID_ROOT_OUT:
@@ -463,6 +462,7 @@ static int32_t FreeAfterDecodePCID(struct FreeDecodePcidJsonInfo freePcidJsonInf
FreeContextBuffer(freePcidJsonInfo.contextBuffer);
break;
case FREE_DECODE_PCID_CONTEXT_OUT:
cJSON_Delete(freePcidJsonInfo.sysCapObj);
default:
FreeContextBuffer(freePcidJsonInfo.contextBuffer);
}
@@ -522,8 +522,6 @@ int32_t DecodePCID(char *inputFile, char *outDirPath)
return FreeAfterDecodePCID(freePcidJsonInfo, FREE_DECODE_PCID_ROOT_OUT, ret);
}
freePcidJsonInfo.sysCapObj = NULL; // avoid being released repeatedly.
freePcidJsonInfo.strJson = cJSON_Print(freePcidJsonInfo.jsonRootObj);
const char outputFileName[] = "pcid.json";