mirror of
https://github.com/MariaDB/server.git
synced 2025-11-18 07:48:43 +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:
|
public:
|
||||||
ConfigValuesFactory(Uint32 keys = 50, Uint32 data = 10); // Initial
|
ConfigValuesFactory(Uint32 keys = 50, Uint32 data = 10); // Initial
|
||||||
ConfigValuesFactory(ConfigValues * m_cfg); //
|
ConfigValuesFactory(ConfigValues * m_cfg); //
|
||||||
|
~ConfigValuesFactory();
|
||||||
|
|
||||||
ConfigValues * m_cfg;
|
ConfigValues * m_cfg;
|
||||||
ConfigValues * getConfigValues();
|
ConfigValues * getConfigValues();
|
||||||
|
|||||||
@@ -294,6 +294,12 @@ ConfigValuesFactory::ConfigValuesFactory(ConfigValues * cfg){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ConfigValuesFactory::~ConfigValuesFactory()
|
||||||
|
{
|
||||||
|
if(m_cfg)
|
||||||
|
free(m_cfg);
|
||||||
|
}
|
||||||
|
|
||||||
ConfigValues *
|
ConfigValues *
|
||||||
ConfigValuesFactory::create(Uint32 keys, Uint32 data){
|
ConfigValuesFactory::create(Uint32 keys, Uint32 data){
|
||||||
Uint32 sz = sizeof(ConfigValues);
|
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;
|
delete fac;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user