summaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/parse-xml.c b/parse-xml.c
index b24806bba..2ecd063b2 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -1562,6 +1562,9 @@ void parse_xml_buffer(const char *url, const char *buffer, int size,
target_table = table;
doc = xmlReadMemory(res, strlen(res), url, NULL, 0);
+ if (res != buffer)
+ free((char *)res);
+
if (!doc) {
fprintf(stderr, _("Failed to parse '%s'.\n"), url);
parser_error(error, _("Failed to parse '%s'"), url);