Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
---
The ticket that was linked previously appears to be invalid.
encoding/json/lex.ha | 1 +
encoding/json/value.ha | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/encoding/json/lex.ha b/encoding/json/lex.ha
index 06b48aa..b07a8ea 100644
--- a/encoding/json/lex.ha
+++ b/encoding/json/lex.ha
@@ -39,6 +39,7 @@ export fn newlexer(src: io::handle) lexer = {
// Frees state associated with a JSON lexer.
export fn close(lex: *lexer) void = {
free(lex.buffer);
+ io::close(&lex.strbuf)!;
};
// Returns the next token from a JSON lexer. The return value is borrowed from
diff --git a/encoding/json/value.ha b/encoding/json/value.ha
index 2dfcc74..d8dd1f2 100644
--- a/encoding/json/value.ha
+++ b/encoding/json/value.ha
@@ -185,8 +185,7 @@ export fn finish(val: value) void = {
free(bucket[j].0);
finish(bucket[j].1);
};
- // TODO: https://todo.sr.ht/~sircmpwn/hare/690
- //free(bucket);
+ free(*bucket);
};
case => void;
};
--
2.39.0