From 3d2d9b34732b7ec067da7c08ff2433d1c6494eaa Mon Sep 17 00:00:00 2001 From: ooxi <85fcd0ef4ec8@f977375cdcd6.anonbox.net> Date: Thu, 1 Nov 2012 00:59:18 +0100 Subject: [PATCH] Fixed memory leak --- src/xml.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xml.c b/src/xml.c index aa8b905..8d37f56 100644 --- a/src/xml.c +++ b/src/xml.c @@ -654,6 +654,8 @@ struct xml_document* xml_parse_document(uint8_t* buffer, size_t length) { * [PUBLIC API] */ void xml_document_free(struct xml_document* document, _Bool free_buffer) { + xml_node_free(document->root); + if (free_buffer) { free(document->buffer.buffer); }