summaryrefslogtreecommitdiff
path: root/src/resources/db/questdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-19 05:47:59 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-19 23:04:53 +0300
commit80ba4766d8ce9861f6d026e791abc741e3fed0f4 (patch)
tree02d509ecd3ae384fba0b8d44a60c71033e3d31d3 /src/resources/db/questdb.cpp
parent4526407e2001244a03674e57db8a6807cbbbe2b0 (diff)
downloadmanaplus-80ba4766d8ce9861f6d026e791abc741e3fed0f4.tar.gz
manaplus-80ba4766d8ce9861f6d026e791abc741e3fed0f4.tar.bz2
manaplus-80ba4766d8ce9861f6d026e791abc741e3fed0f4.tar.xz
manaplus-80ba4766d8ce9861f6d026e791abc741e3fed0f4.zip
Fix some memory leaks and add duplicate item fields check.
Diffstat (limited to 'src/resources/db/questdb.cpp')
-rw-r--r--src/resources/db/questdb.cpp3
1 files changed, 2 insertions, 1 deletions
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<const char*>(
+ char *const data = reinterpret_cast<char*>(
XmlNodeGetContent(dataNode));
if (!data)
continue;
std::string str = translator->getStr(data);
+ XmlFree(data);
for (int f = 1; f < 100; f ++)
{