summaryrefslogtreecommitdiff
path: root/xs_json.h
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-09-20 09:02:16 +0200
committerdefault <nobody@localhost>2022-09-20 09:02:16 +0200
commitc30a610a41337e749377f1762edf5603be531f65 (patch)
tree5732d7a6404ebd03fe38b77c1ff548c5e66b33a9 /xs_json.h
parent6b4f2d2b3a8ed6b7996dd274860d59876624bc8f (diff)
JSON tweaks.
Diffstat (limited to 'xs_json.h')
-rw-r--r--xs_json.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/xs_json.h b/xs_json.h
index f529b47..5280b14 100644
--- a/xs_json.h
+++ b/xs_json.h
@@ -372,7 +372,7 @@ d_char *_xs_json_loads_array(const char **json, js_type *t)
l = xs_list_append(l, v);
while (*t == JS_INCOMPLETE) {
- xs *v1 = _xs_json_loads_lexer(&s, &tt);
+ free(_xs_json_loads_lexer(&s, &tt));
if (tt == JS_CBRACK)
*t = JS_ARRAY;
@@ -425,7 +425,7 @@ d_char *_xs_json_loads_object(const char **json, js_type *t)
*t = JS_OBJECT;
else
if (tt == JS_STRING) {
- xs *t1 = _xs_json_loads_lexer(&s, &tt);
+ free(_xs_json_loads_lexer(&s, &tt));
if (tt == JS_COLON) {
xs *v1;
@@ -437,7 +437,7 @@ d_char *_xs_json_loads_object(const char **json, js_type *t)
d = xs_dict_append(d, k1, v1);
while (*t == JS_INCOMPLETE) {
- xs *t2 = _xs_json_loads_lexer(&s, &tt);
+ free(_xs_json_loads_lexer(&s, &tt));
if (tt == JS_CCURLY)
*t = JS_OBJECT;
@@ -446,7 +446,7 @@ d_char *_xs_json_loads_object(const char **json, js_type *t)
xs *k = _xs_json_loads_lexer(&s, &tt);
if (tt == JS_STRING) {
- xs *t3 = _xs_json_loads_lexer(&s, &tt);
+ free(_xs_json_loads_lexer(&s, &tt));
if (tt == JS_COLON) {
xs *v;