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/resources/db/questdb.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/resources/db/questdb.cpp') diff --git a/src/resources/db/questdb.cpp b/src/resources/db/questdb.cpp index 93bcada6e..da05721b1 100644 --- a/src/resources/db/questdb.cpp +++ b/src/resources/db/questdb.cpp @@ -83,11 +83,12 @@ static void loadQuest(const int var, { if (!xmlTypeEqual(dataNode, XML_ELEMENT_NODE)) continue; - const char *const data = reinterpret_cast( + char *const data = reinterpret_cast( XmlNodeGetContent(dataNode)); if (!data) continue; std::string str = translator->getStr(data); + XmlFree(data); for (int f = 1; f < 100; f ++) { -- cgit v1.2.3-70-g09d2