Skip to content

Commit

Permalink
MDEV-10258 - Valgrind warnings in buildbot after a set of mroonga tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Sergey Vojtovich committed Jun 21, 2016
1 parent 82a9692 commit 8255781
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion storage/mroonga/ha_mroonga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8255781

Please sign in to comment.