From 0c745c743c65ceb6533babdf21556b633e81566c Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Sun, 29 Jul 2018 10:56:11 +0300 Subject: Don't give warnings from perror or resolveip with safemalloc - Added my_end(0) before exit - Fixed typo in mysql_install_db --- extra/perror.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'extra/perror.c') diff --git a/extra/perror.c b/extra/perror.c index 3bc5120db48..bd62401c8b2 100644 --- a/extra/perror.c +++ b/extra/perror.c @@ -105,11 +105,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; case 'V': print_version(); + my_end(0); exit(0); break; case 'I': case '?': usage(); + my_end(0); exit(0); break; } @@ -122,7 +124,10 @@ static int get_options(int *argc,char ***argv) int ho_error; if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option))) + { + my_end(0); exit(ho_error); + } if (!*argc && !print_all_codes) { @@ -260,7 +265,10 @@ int main(int argc,char *argv[]) MY_INIT(argv[0]); if (get_options(&argc,&argv)) + { + my_end(0); exit(1); + } my_handler_error_register(); -- cgit v1.2.1