mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
BUG#21670 memory leak in ndb_mgm -e show
fix the following valgrind warning when running ndb_mgm -e show (leak only in client) ==20398== 14,596 (11,936 direct, 2,660 indirect) bytes in 4 blocks are definitely lost in loss record 24 of 25 ==20398== at 0x401C4A1: malloc (vg_replace_malloc.c:149) ==20398== by 0x80797A3: ConfigValuesFactory::create(unsigned, unsigned) (ConfigValues.cpp:309) ==20398== by 0x8079F03: ConfigValuesFactory::expand(unsigned, unsigned) (ConfigValues.cpp:325) ==20398== by 0x8079967: ConfigValuesFactory::put(ConfigValues::Entry const&) (ConfigValues.cpp:414) ==20398== by 0x807A7B6: ConfigValuesFactory::unpack(void const*, unsigned) (ConfigValues.cpp:701) ==20398== by 0x806CB9D: ConfigValuesFactory::unpack(UtilBuffer const&) (ConfigValues.hpp:252) ==20398== by 0x8069160: ndb_mgm_get_configuration (mgmapi.cpp:1941) ==20398== by 0x8060661: CommandInterpreter::executeShow(char*) (CommandInterpreter.cpp:1242) ==20398== by 0x8063966: CommandInterpreter::execute_impl(char const*) (CommandInterpreter.cpp:715) ==20398== by 0x8064040: CommandInterpreter::execute(char const*, int, int*) (CommandInterpreter.cpp:625) ==20398== by 0x8064189: Ndb_mgmclient::execute(char const*, int, int*) (CommandInterpreter.cpp:203) ==20398== by 0x805E56C: read_and_execute(int) (main.cpp:124) ==20398== by 0x805E754: main (main.cpp:162) ==20398== ndb/src/mgmclient/CommandInterpreter.cpp: correctly free (destroy) the configuration fetched for show
This commit is contained in:
parent
f32014a917
commit
60a0e3d0dd
1 changed files with 2 additions and 0 deletions
|
@ -1245,6 +1245,7 @@ CommandInterpreter::executeShow(char* parameters)
|
|||
|
||||
if(it == 0){
|
||||
ndbout_c("Unable to create config iterator");
|
||||
ndb_mgm_destroy_configuration(conf);
|
||||
return;
|
||||
}
|
||||
NdbAutoPtr<ndb_mgm_configuration_iterator> ptr(it);
|
||||
|
@ -1291,6 +1292,7 @@ CommandInterpreter::executeShow(char* parameters)
|
|||
print_nodes(state, it, "ndb_mgmd", mgm_nodes, NDB_MGM_NODE_TYPE_MGM, 0);
|
||||
print_nodes(state, it, "mysqld", api_nodes, NDB_MGM_NODE_TYPE_API, 0);
|
||||
// ndbout << helpTextShow;
|
||||
ndb_mgm_destroy_configuration(conf);
|
||||
return;
|
||||
} else if (strcasecmp(parameters, "PROPERTIES") == 0 ||
|
||||
strcasecmp(parameters, "PROP") == 0) {
|
||||
|
|
Loading…
Reference in a new issue