summaryrefslogtreecommitdiff
path: root/client/mysqlimport.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysqlimport.c')
-rw-r--r--client/mysqlimport.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index 9d30fd989ca..82dbd682bd6 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -570,15 +570,18 @@ static void safe_exit(int error, MYSQL *mysql)
if (mysql)
mysql_close(mysql);
- if (error)
- sf_leaking_memory= 1; /* dirty exit, some threads are still running */
- else
+ if (counter)
{
- mysql_library_end();
- free_defaults(argv_to_free);
- my_free(opt_password);
- my_end(my_end_arg); /* clean exit */
+ /* dirty exit. some threads are running,
+ memory is not freed, openssl not deinitialized */
+ DBUG_ASSERT(error);
+ _exit(error);
}
+
+ mysql_library_end();
+ free_defaults(argv_to_free);
+ my_free(opt_password);
+ my_end(my_end_arg); /* clean exit */
exit(error);
}