mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 10:21:25 -04:00
+1
-3
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user