diff options
author | stewart@mysql.com <> | 2006-04-24 15:20:45 -0700 |
---|---|---|
committer | stewart@mysql.com <> | 2006-04-24 15:20:45 -0700 |
commit | 518100f0b2c79b415158202dd9c070dd7f7fc4d6 (patch) | |
tree | 42678890d6da275ae2f17f2b3ea7a7a329f4c9a3 /ndb | |
parent | 5ec0af4acbc71f9fcbf174f2ae8c5113f2c0b302 (diff) | |
download | mariadb-git-518100f0b2c79b415158202dd9c070dd7f7fc4d6.tar.gz |
BUG#19318 valgrind: memory leak in ndb_mgmd
clean up after ConfigValuesFactory
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/include/util/ConfigValues.hpp | 1 | ||||
-rw-r--r-- | ndb/src/common/util/ConfigValues.cpp | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ndb/include/util/ConfigValues.hpp b/ndb/include/util/ConfigValues.hpp index 457488e3c42..8dfb3c83df3 100644 --- a/ndb/include/util/ConfigValues.hpp +++ b/ndb/include/util/ConfigValues.hpp @@ -96,6 +96,7 @@ public: public: ConfigValuesFactory(Uint32 keys = 50, Uint32 data = 10); // Initial ConfigValuesFactory(ConfigValues * m_cfg); // + ~ConfigValuesFactory(); ConfigValues * m_cfg; ConfigValues * getConfigValues(); diff --git a/ndb/src/common/util/ConfigValues.cpp b/ndb/src/common/util/ConfigValues.cpp index 5c4b17c73ca..ae4fbfd2f71 100644 --- a/ndb/src/common/util/ConfigValues.cpp +++ b/ndb/src/common/util/ConfigValues.cpp @@ -294,6 +294,12 @@ ConfigValuesFactory::ConfigValuesFactory(ConfigValues * cfg){ } } +ConfigValuesFactory::~ConfigValuesFactory() +{ + if(m_cfg) + free(m_cfg); +} + ConfigValues * ConfigValuesFactory::create(Uint32 keys, Uint32 data){ Uint32 sz = sizeof(ConfigValues); @@ -528,7 +534,7 @@ ConfigValuesFactory::extractCurrentSection(const ConfigValues::ConstIterator & c } } - ConfigValues * ret = fac->m_cfg; + ConfigValues * ret = fac->getConfigValues(); delete fac; return ret; } |