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 99b46ce3c6b..a8f6f11520d 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -519,13 +519,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);
}