Skip to content

Commit 4f1ad43

Browse files
committed
MDEV-9987 - gen_lex_hash leaks memory, making LeakSanitizer builds fail
Fixed memory leaks in gen_lex_hash.
1 parent 29868de commit 4f1ad43

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sql/gen_lex_hash.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ void print_find_structs()
310310
add_structs_to_map(root_by_len,max_len);
311311
set_links(root_by_len,max_len);
312312
print_hash_map("sql_functions_map");
313+
free(hash_map);
313314

314315
hash_map= 0;
315316
size_hash_map= 0;
@@ -319,6 +320,7 @@ void print_find_structs()
319320
add_structs_to_map(root_by_len2,max_len2);
320321
set_links(root_by_len2,max_len2);
321322
print_hash_map("symbols_map");
323+
free(hash_map);
322324
}
323325

324326

0 commit comments

Comments
 (0)