mirror of
https://github.com/MariaDB/server.git
synced 2025-11-16 20:23:18 +03:00
BUG#19318 valgrind: memory leak in ndb_mgmd
clean up after ConfigValuesFactory
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user