MDEV-10258 - Valgrind warnings in buildbot after a set of mroonga tests
Fixed memory leak when mroonga fails to open index files. Memory leak was detected by valgrind when running mroonga/storage.repair_table_no_index_file.
This commit is contained in:
parent
82a96926a7
commit
8255781d9b
@ -4184,9 +4184,12 @@ int ha_mroonga::storage_open(const char *name, int mode, uint test_if_locked)
|
||||
if (!(ha_thd()->open_options & HA_OPEN_FOR_REPAIR)) {
|
||||
error = storage_open_indexes(name);
|
||||
if (error) {
|
||||
// TODO: free grn_columns and set NULL;
|
||||
grn_obj_unlink(ctx, grn_table);
|
||||
grn_table = NULL;
|
||||
// TODO: unlink elements
|
||||
free(grn_columns);
|
||||
// TODO: unlink elements
|
||||
free(grn_column_ranges);
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user