src/json.c

changeset 1075
0cc4b63a0ae0
parent 1072
c89283cd559b
child 1077
911a154dd469
--- a/src/json.c	Wed Jan 01 15:50:57 2025 +0100
+++ b/src/json.c	Wed Jan 01 15:56:02 2025 +0100
@@ -419,6 +419,10 @@
     }
     cxJsonValueFree(json->parsed);
     json->parsed = NULL;
+    if (json->uncompleted_member.name.ptr != NULL) {
+        cx_strfree_a(json->allocator, &json->uncompleted_member.name);
+        json->uncompleted_member = (CxJsonObjValue){{NULL, 0}, NULL};
+    }
 }
 
 int cxJsonFilln(CxJson *json, const char *buf, size_t size) {

mercurial