summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-23 23:14:51 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-23 23:14:51 +0300
commit1a0621cc445e819761b5a96fbb13afc9d696b949 (patch)
treeef0230aa67ff2c79a16ff18f9181afb1982d4199
parent906332df8779bca71641c6bcdc84d04a1de6d2eb (diff)
downloadmanaverse-1a0621cc445e819761b5a96fbb13afc9d696b949.tar.gz
manaverse-1a0621cc445e819761b5a96fbb13afc9d696b949.tar.bz2
manaverse-1a0621cc445e819761b5a96fbb13afc9d696b949.tar.xz
manaverse-1a0621cc445e819761b5a96fbb13afc9d696b949.zip
Fix possible memory leak.
-rw-r--r--src/resources/mapreader.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 3a9a384bd..9e6422c58 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -973,7 +973,10 @@ Tileset *MapReader::readTileset(XmlNodePtr node,
// create animation
if (!set || !config.getBoolValue("playMapAnimations"))
+ {
+ delete ani;
continue;
+ }
for (int i = 0; ; i++)
{