summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-10-22 15:03:42 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-10-22 15:03:42 +0000
commit69ae4ca599df6a5de249b2214c839bcac2e2feba (patch)
treef084a7d4d6017222d5fa21a7a653ed6580ed2233
parent256705ac9eee8990bd92f60c8e2550954c9e5983 (diff)
downloadMana-69ae4ca599df6a5de249b2214c839bcac2e2feba.tar.gz
Mana-69ae4ca599df6a5de249b2214c839bcac2e2feba.tar.bz2
Mana-69ae4ca599df6a5de249b2214c839bcac2e2feba.tar.xz
Mana-69ae4ca599df6a5de249b2214c839bcac2e2feba.zip
Plugged memory leak in particle engine.
-rw-r--r--ChangeLog4
-rw-r--r--src/particle.cpp3
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6cbd1249..d77170f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-10-22 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/particle.cpp: Plugged memory leak.
+
2007-10-21 Guillaume Melquiond <guillaume.melquiond@gmail.com>
* src/gui/window.cpp, src/gui/window.h: Removed redundant resizable
diff --git a/src/particle.cpp b/src/particle.cpp
index cdd6af41..0f116b15 100644
--- a/src/particle.cpp
+++ b/src/particle.cpp
@@ -240,6 +240,7 @@ Particle::addEffect(const std::string &particleEffectFile,
{
logger->log("Warning: %s is not a valid particle effect definition file!",
particleEffectFile.c_str());
+ xmlFreeDoc(doc);
return NULL;
}
@@ -299,6 +300,8 @@ Particle::addEffect(const std::string &particleEffectFile,
mChildParticles.push_back(newParticle);
}
+ xmlFreeDoc(doc);
+
return newParticle;
}