fix memory leak in case of json parser errors

Tue, 22 Oct 2024 12:23:43 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 22 Oct 2024 12:23:43 +0200
changeset 943
9f1eb30dbc84
parent 942
8a5bbdb7f87f
child 944
c26299cc9897

fix memory leak in case of json parser errors

src/json.c file | annotate | diff | comparison | revisions
--- a/src/json.c	Tue Oct 22 12:17:48 2024 +0200
+++ b/src/json.c	Tue Oct 22 12:23:43 2024 +0200
@@ -670,6 +670,8 @@
     free(p->states);
     free(p->readvalue_stack);
     cxJsonValueFree(p->read_value);
+    free(p->value_name);
+    free(p->value_str);
 }
 
 void cxJsonFill(CxJson *p, const char *buf, size_t size) {

mercurial