From 80ba4766d8ce9861f6d026e791abc741e3fed0f4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 19 Feb 2017 05:47:59 +0300 Subject: Fix some memory leaks and add duplicate item fields check. --- src/utils/xml/libxml.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/utils/xml') diff --git a/src/utils/xml/libxml.cpp b/src/utils/xml/libxml.cpp index c19255b24..b85e456f4 100644 --- a/src/utils/xml/libxml.cpp +++ b/src/utils/xml/libxml.cpp @@ -250,9 +250,16 @@ namespace XML xmlChar *const prop = XmlGetProp(node, name); if (XmlStrEqual(prop, "true")) + { + XmlFree(prop); return true; + } if (XmlStrEqual(prop, "false")) + { + XmlFree(prop); return false; + } + XmlFree(prop); return def; } -- cgit v1.2.3-70-g09d2