fix that token_destroy() did not set token->allocated to false

Wed, 10 Dec 2025 22:03:08 +0100

author
Mike Becker <universe@uap-core.de>
date
Wed, 10 Dec 2025 22:03:08 +0100
changeset 1564
500e3c744d87
parent 1563
6e2f83ef6f5a
child 1565
fb314eeca7a4

fix that token_destroy() did not set token->allocated to false

src/json.c file | annotate | diff | comparison | revisions
--- a/src/json.c	Wed Dec 10 14:05:20 2025 +0100
+++ b/src/json.c	Wed Dec 10 22:03:08 2025 +0100
@@ -45,6 +45,7 @@
 static void token_destroy(CxJsonToken *token) {
     if (token->allocated) {
         cx_strfree(&token->content);
+        token->allocated = false;
     }
 }
 

mercurial