diff options
-rw-r--r-- | client/mysql.cc | 5 | ||||
-rw-r--r-- | client/mysqltest.cc | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 6443fa4b40c..7973c3c7fc3 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1140,6 +1140,7 @@ int main(int argc,char *argv[]) current_prompt = my_strdup(default_prompt,MYF(MY_WME)); prompt_counter=0; aborted= 0; + sf_leaking_memory= 1; /* no memory leak reports yet */ outfile[0]=0; // no (default) outfile strmov(pager, "stdout"); // the default, if --pager wasn't given @@ -1200,6 +1201,7 @@ int main(int argc,char *argv[]) my_end(0); exit(1); } + sf_leaking_memory= 0; glob_buffer.realloc(512); completion_hash_init(&ht, 128); init_alloc_root(&hash_mem_root, 16384, 0, MYF(0)); @@ -1795,10 +1797,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), #ifndef EMBEDDED_LIBRARY if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib, opt->name)) <= 0) - { - sf_leaking_memory= 1; /* no memory leak reports here */ exit(1); - } #endif break; case OPT_SERVER_ARG: diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 2200462b2fe..844a2d7bbf8 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -1523,7 +1523,6 @@ static void cleanup_and_exit(int exit_code) } } - sf_leaking_memory= 0; /* all memory should be freed by now */ exit(exit_code); } @@ -7294,10 +7293,7 @@ get_one_option(int optid, const struct my_option *opt, char *argument) #ifndef EMBEDDED_LIBRARY if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib, opt->name)) <= 0) - { - sf_leaking_memory= 1; /* no memory leak reports here */ exit(1); - } #endif break; case '?': |