mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 20:29:57 -04:00
[Bug] Using cJSON_free to free memory allocated by cJSON_Print
issueNo: https://gitee.com/openharmony/developtools_syscap_codec/issues/IAKW57 Signed-off-by: luming <luming29@huawei.com>
This commit is contained in:
+3
-1
@@ -759,7 +759,9 @@ int32_t DecodeStringPCIDToJson(char *input, char *outDirPath)
|
||||
ret = 0;
|
||||
|
||||
FAILED:
|
||||
SafeFree(jsonBuffer);
|
||||
if (jsonBuffer != NULL) {
|
||||
cJSON_free(jsonBuffer)
|
||||
}
|
||||
SafeFree(priSyscapStr);
|
||||
cJSON_Delete(sysCapObj);
|
||||
cJSON_Delete(rootObj);
|
||||
|
||||
Reference in New Issue
Block a user