Skip to content

Commit 01bccb7

Browse files
authored
Merge pull request #6174 from antisaling/push-uovqmomtyvul
encoding/xml: pass allocator on destroy
2 parents a57096b + 56445df commit 01bccb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/encoding/xml/xml_reader.odin

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,8 @@ load_from_file :: proc(filename: string, options := DEFAULT_OPTIONS, error_handl
386386
return parse_bytes(data, options, filename, error_handler, allocator)
387387
}
388388

389-
destroy :: proc(doc: ^Document) {
389+
destroy :: proc(doc: ^Document, allocator := context.allocator) {
390+
context.allocator = allocator
390391
if doc == nil { return }
391392

392393
for el in doc.elements {

0 commit comments

Comments
 (0)