aboutsummaryrefslogtreecommitdiff
path: root/core/encoding
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2025-06-09 15:09:04 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2025-06-09 15:09:04 +0200
commit179e5b88357f7d88e715713ec5c4d82bc51df811 (patch)
tree2670ac8cd99a791e3a1b54b75d1e6644a9aed58b /core/encoding
parent87247b8bb787e53f7ca26fba1a11739844bf442d (diff)
Fix #4705
Allocate `doc.tokenizer`, and free it in `destroy`.
Diffstat (limited to 'core/encoding')
-rw-r--r--core/encoding/xml/xml_reader.odin3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/encoding/xml/xml_reader.odin b/core/encoding/xml/xml_reader.odin
index d616be9dc..707d2b3f3 100644
--- a/core/encoding/xml/xml_reader.odin
+++ b/core/encoding/xml/xml_reader.odin
@@ -175,7 +175,7 @@ parse_bytes :: proc(data: []u8, options := DEFAULT_OPTIONS, path := "", error_ha
data = bytes.clone(data)
}
- t := &Tokenizer{}
+ t := new(Tokenizer)
init(t, string(data), path, error_handler)
doc = new(Document)
@@ -403,6 +403,7 @@ destroy :: proc(doc: ^Document) {
}
delete(doc.strings_to_free)
+ free(doc.tokenizer)
free(doc)
}