From a1846b7a642dd5b5b36f3d4f0099cb7c0149f859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 25 Mar 2020 12:09:47 +0200 Subject: MDEV-22035 Memory leak in main.mysqltest 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. --- client/mysqltest.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 1517771e743..46e83bf0292 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -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); } -- cgit v1.2.1