Browse Source

Merge pull request #5303 from Kelimion/fix-4705

Fix #4705
Jeroen van Rijn 2 months ago
parent
commit
4a675395c5
1 changed files with 2 additions and 1 deletions
  1. 2 1
      core/encoding/xml/xml_reader.odin

+ 2 - 1
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)
 }