From fe8181aca13cf7ba1835fa6c89f297a1d0e79856 Mon Sep 17 00:00:00 2001 From: Monty Date: Mon, 12 Aug 2019 15:40:57 +0300 Subject: Fixed issues found by valgrind - mysqltest didn't free read_command_buf - wait_for_slave_param did write different things to the log if valgrind was used. - Table open cache should not write the initial variable value as it can depend on the configuration or if valgrind is used - A variable in GetResult was used uninitalized --- client/mysqltest.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 7c46bd194c5..ad868722dfb 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -193,6 +193,7 @@ static char TMPDIR[FN_REFLEN]; static char global_subst_from[200]; static char global_subst_to[200]; static char *global_subst= NULL; +static char *read_command_buf= NULL; static MEM_ROOT require_file_root; static const my_bool my_true= 1; static const my_bool my_false= 0; @@ -1531,6 +1532,7 @@ void free_used_memory() free_defaults(default_argv); free_root(&require_file_root, MYF(0)); free_re(); + my_free(read_command_buf); #ifdef _WIN32 free_tmp_sh_file(); free_win_path_patterns(); @@ -6563,7 +6565,6 @@ static inline bool is_escape_char(char c, char in_string) */ -static char *read_command_buf= NULL; static size_t read_command_buflen= 0; static const size_t max_multibyte_length= 6; -- cgit v1.2.1