Free last json string

This commit is contained in:
Krad
2021-10-28 09:09:09 +08:00
parent c36d0b5cce
commit 8bd58c553a

View File

@@ -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;