From 8bd58c553aba862e087d14bb39291f56c819eedf Mon Sep 17 00:00:00 2001 From: Krad Date: Thu, 28 Oct 2021 09:09:09 +0800 Subject: [PATCH] Free last json string --- src/patientinformationform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/patientinformationform.cpp b/src/patientinformationform.cpp index f10cf08..165e70c 100644 --- a/src/patientinformationform.cpp +++ b/src/patientinformationform.cpp @@ -55,7 +55,7 @@ const char *PatientInformationForm::getCurrentPatientJsonString(bool empty) { cJSON_AddItemToObject(root, "ReferringPhysicianName",cJSON_CreateString("XX")); cJSON_AddItemToObject(root, "InstituteName",cJSON_CreateString("EQ9")); cJSON_AddItemToObject(root, "InstituteAddress",cJSON_CreateString("HZ")); -// delete jsonstr; + delete jsonstr; jsonstr = cJSON_Print(root); cJSON_Delete(root); return jsonstr;