Commit 518100f0 authored by stewart@mysql.com's avatar stewart@mysql.com

BUG#19318 valgrind: memory leak in ndb_mgmd

clean up after ConfigValuesFactory
parent 5ec0af4a
......@@ -96,6 +96,7 @@ public:
public:
ConfigValuesFactory(Uint32 keys = 50, Uint32 data = 10); // Initial
ConfigValuesFactory(ConfigValues * m_cfg); //
~ConfigValuesFactory();
ConfigValues * m_cfg;
ConfigValues * getConfigValues();
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment