summaryrefslogtreecommitdiff
path: root/client/mysqlimport.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysqlimport.c')
-rw-r--r--client/mysqlimport.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index 48f11667cd1..cfd2759cd77 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -574,13 +574,15 @@ static void safe_exit(int error, MYSQL *mysql)
if (mysql)
mysql_close(mysql);
- mysql_library_end();
- free_defaults(argv_to_free);
- my_free(opt_password);
if (error)
sf_leaking_memory= 1; /* dirty exit, some threads are still running */
else
+ {
+ mysql_library_end();
+ free_defaults(argv_to_free);
+ my_free(opt_password);
my_end(my_end_arg); /* clean exit */
+ }
exit(error);
}