summaryrefslogtreecommitdiff
path: root/src/resources/db/deaddb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/db/deaddb.cpp')
-rw-r--r--src/resources/db/deaddb.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/resources/db/deaddb.cpp b/src/resources/db/deaddb.cpp
index 251ae3a33..778d88a0b 100644
--- a/src/resources/db/deaddb.cpp
+++ b/src/resources/db/deaddb.cpp
@@ -73,11 +73,17 @@ void DeadDB::loadXmlFile(const std::string &fileName,
}
else if (xmlNameEqual(node, "message"))
{
- const char *const data = reinterpret_cast<const char*>(
+ char *const data = reinterpret_cast<char*>(
XmlNodeGetContent(node));
- if (!data || !*data)
+ if (!data)
continue;
+ if (!*data)
+ {
+ XmlFree(data);
+ continue;
+ }
mMessages.push_back(data);
+ XmlFree(data);
}
}