diff --git a/ProcessHacker/ProcessHacker.def b/ProcessHacker/ProcessHacker.def index 58292c7ea383..5b7012ca6791 100644 --- a/ProcessHacker/ProcessHacker.def +++ b/ProcessHacker/ProcessHacker.def @@ -708,7 +708,7 @@ EXPORTS ; json PhCreateJsonParser - PhFreeJsonParser + PhFreeJsonObject PhGetJsonValueAsString PhGetJsonValueAsInt64 PhGetJsonValueAsUInt64 diff --git a/phlib/hndlinfo.c b/phlib/hndlinfo.c index a0800a76d651..b903c08c2982 100644 --- a/phlib/hndlinfo.c +++ b/phlib/hndlinfo.c @@ -454,7 +454,7 @@ VOID PhInitializeEtwTraceGuidCache( if (!(arrayLength = PhGetJsonArrayLength(jsonObject))) { - PhFreeJsonParser(jsonObject); + PhFreeJsonObject(jsonObject); return; } @@ -488,7 +488,7 @@ VOID PhInitializeEtwTraceGuidCache( PhDereferenceObject(guidString); } - PhFreeJsonParser(jsonObject); + PhFreeJsonObject(jsonObject); PhDereferenceObject(capabilityListString); } diff --git a/phlib/include/json.h b/phlib/include/json.h index f6ac372d8c2a..82e4253a3f4f 100644 --- a/phlib/include/json.h +++ b/phlib/include/json.h @@ -43,7 +43,7 @@ PhCreateJsonParser( PHLIBAPI VOID NTAPI -PhFreeJsonParser( +PhFreeJsonObject( _In_ PVOID Object ); diff --git a/phlib/json.c b/phlib/json.c index 39cc4ae941c1..2589ba1b6634 100644 --- a/phlib/json.c +++ b/phlib/json.c @@ -51,7 +51,7 @@ PVOID PhCreateJsonParser( return json_tokener_parse(JsonString); } -VOID PhFreeJsonParser( +VOID PhFreeJsonObject( _In_ PVOID Object ) { diff --git a/plugins/DotNetTools/clrsup.c b/plugins/DotNetTools/clrsup.c index 54e58a171d70..ef7e357a0568 100644 --- a/plugins/DotNetTools/clrsup.c +++ b/plugins/DotNetTools/clrsup.c @@ -857,7 +857,7 @@ PPH_BYTES DnProcessAppDomainListSerialize( } string = PhGetJsonArrayString(jsonArray, FALSE); - PhFreeJsonParser(jsonArray); + PhFreeJsonObject(jsonArray); return string; } @@ -946,7 +946,7 @@ PPH_LIST DnProcessAppDomainListDeserialize( } CleanupExit: - PhFreeJsonParser(jsonArray); + PhFreeJsonObject(jsonArray); return processAppdomainList; } diff --git a/plugins/OnlineChecks/upload.c b/plugins/OnlineChecks/upload.c index f3a31c638c29..0265796f49a2 100644 --- a/plugins/OnlineChecks/upload.c +++ b/plugins/OnlineChecks/upload.c @@ -803,7 +803,7 @@ NTSTATUS UploadFileThreadStart( goto CleanupExit; } - PhFreeJsonParser(jsonRootObject); + PhFreeJsonObject(jsonRootObject); } else { @@ -867,7 +867,7 @@ NTSTATUS UploadFileThreadStart( PhMoveReference(&context->LaunchCommand, PhGetJsonValueAsString(jsonRootObject, "permalink")); } - PhFreeJsonParser(jsonRootObject); + PhFreeJsonObject(jsonRootObject); } if (PhIsNullOrEmptyString(context->LaunchCommand)) @@ -902,7 +902,7 @@ NTSTATUS UploadFileThreadStart( PhDereferenceObject(redirectUrl); } - PhFreeJsonParser(jsonRootObject); + PhFreeJsonObject(jsonRootObject); } PhDereferenceObject(jsonString); @@ -1093,7 +1093,7 @@ NTSTATUS UploadCheckThreadStart( } PhClearReference(&errorMessage); - PhFreeJsonParser(rootJsonObject); + PhFreeJsonObject(rootJsonObject); } else { @@ -1228,7 +1228,7 @@ NTSTATUS UploadCheckThreadStart( if (vt3RootJsonObject = PhCreateJsonParser(vt3UploadRequestBuffer->Buffer)) { context->UploadUrl = PhGetJsonValueAsString(vt3RootJsonObject, "data"); - PhFreeJsonParser(vt3RootJsonObject); + PhFreeJsonObject(vt3RootJsonObject); } PhClearReference(&vt3UploadRequestBuffer); @@ -1245,7 +1245,7 @@ NTSTATUS UploadCheckThreadStart( } } - PhFreeJsonParser(rootJsonObject); + PhFreeJsonObject(rootJsonObject); } else { diff --git a/plugins/OnlineChecks/virustotal.c b/plugins/OnlineChecks/virustotal.c index 0eba79284faa..8caab1e54f4e 100644 --- a/plugins/OnlineChecks/virustotal.c +++ b/plugins/OnlineChecks/virustotal.c @@ -477,7 +477,7 @@ PVIRUSTOTAL_FILE_REPORT VirusTotalRequestFileReport( PhHttpSocketDestroy(httpContext); if (jsonRootObject) - PhFreeJsonParser(jsonRootObject); + PhFreeJsonObject(jsonRootObject); PhClearReference(&jsonString); PhClearReference(&versionString); @@ -604,7 +604,7 @@ PVIRUSTOTAL_API_RESPONSE VirusTotalRequestFileReScan( PhHttpSocketDestroy(httpContext); if (jsonRootObject) - PhFreeJsonParser(jsonRootObject); + PhFreeJsonObject(jsonRootObject); PhClearReference(&jsonString); PhClearReference(&versionString); @@ -711,7 +711,7 @@ PVIRUSTOTAL_API_RESPONSE VirusTotalRequestIpAddressReport( PhHttpSocketDestroy(httpContext); if (jsonRootObject) - PhFreeJsonParser(jsonRootObject); + PhFreeJsonObject(jsonRootObject); PhClearReference(&jsonString); PhClearReference(&versionString); @@ -841,7 +841,7 @@ NTSTATUS NTAPI VirusTotalProcessApiThread( if (rootJsonObject) { - PhFreeJsonParser(rootJsonObject); + PhFreeJsonObject(rootJsonObject); } if (jsonArrayToSendString) @@ -849,7 +849,7 @@ NTSTATUS NTAPI VirusTotalProcessApiThread( if (jsonArray) { - PhFreeJsonParser(jsonArray); + PhFreeJsonObject(jsonArray); } if (jsonApiResult) diff --git a/plugins/Updater/options.c b/plugins/Updater/options.c index c73131ef125c..5ac4f6039fcb 100644 --- a/plugins/Updater/options.c +++ b/plugins/Updater/options.c @@ -313,7 +313,7 @@ PPH_LIST PhpUpdaterQueryCommitHistory( PhHttpSocketDestroy(httpContext); if (jsonRootObject) - PhFreeJsonParser(jsonRootObject); + PhFreeJsonObject(jsonRootObject); PhClearReference(&jsonString); PhClearReference(&versionString); diff --git a/plugins/Updater/updater.c b/plugins/Updater/updater.c index 26ebbcda120f..601197eac01d 100644 --- a/plugins/Updater/updater.c +++ b/plugins/Updater/updater.c @@ -428,7 +428,7 @@ BOOLEAN QueryUpdateData( Context->LatestVersion = ParseVersionString(Context->Version); #endif - PhFreeJsonParser(jsonObject); + PhFreeJsonObject(jsonObject); if (PhIsNullOrEmptyString(Context->Version)) goto CleanupExit; @@ -1097,7 +1097,7 @@ VOID ShowStartupUpdateDialog( #else context->LatestVersion = ParseVersionString(context->Version); #endif - PhFreeJsonParser(jsonObject); + PhFreeJsonObject(jsonObject); } PhDereferenceObject(jsonStringUtf8);