diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2020-03-12 09:35:08 -0700 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2020-03-14 22:35:16 -0700 |
commit | afce7e2db18bb7e22a42b8895c26c8a2c811b10d (patch) | |
tree | d8bd0d0218abbe553bd4d31710dfd31b52bb0d65 | |
parent | 1048a84703315baa0c1960c4838ba25f321c459d (diff) |
fixup! json: Introduce JSON parser
-rw-r--r-- | json.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -81,7 +81,7 @@ static int json_parse_string(struct json_value *value) return 0; } - while ((ch = input()) && ch != '"') + while ((ch = input()) && ch != '"' && b - buf < sizeof(buf) - 1) *b++ = ch; *b = '\0'; @@ -350,7 +350,7 @@ struct json_value *json_parse_file(const char *file) ret = json_parse_value(root); if (ret != 1) { - free(root); + json_free(root); return NULL; } |