Skip to content

Commit

Permalink
MDEV-22035 Memory leak in main.mysqltest
Browse files Browse the repository at this point in the history
The test main.mysqltest could crash or hang with
cmake -DWITH_ASAN=ON builds. The reason appears to be
a memory leak, which was found out by manually invoking

echo --replace_regex a > file
ASAN_OPTIONS=log_path=/dev/shm/asan mysqltest ... < file

and then examining the /dev/shm/asan.* file.
  • Loading branch information
dr-m committed Apr 1, 2020
1 parent bc862c4 commit a1846b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/mysqltest.cc
Expand Up @@ -10190,6 +10190,7 @@ void append_replace_regex(char* expr, char *expr_end, struct st_replace_regex* r
return;

err:
my_free(res->regex_arr.buffer);
my_free(res);
die("Error parsing replace_regex \"%s\"", expr);
}
Expand Down

0 comments on commit a1846b7

Please sign in to comment.