diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqlbinlog.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index b1a931a9df1..60b54a2ed99 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -788,7 +788,8 @@ static void die(const char* fmt, ...) fprintf(stderr, "\n"); va_end(args); cleanup(); - my_end(0); + /* We cannot free DBUG, it is used in global destructors after exit(). */ + my_end(MY_DONT_FREE_DBUG); exit(1); } @@ -1460,7 +1461,8 @@ int main(int argc, char** argv) cleanup(); free_defaults(defaults_argv); my_free_open_file_info(); - my_end(0); + /* We cannot free DBUG, it is used in global destructors after exit(). */ + my_end(MY_DONT_FREE_DBUG); exit(exit_value); DBUG_RETURN(exit_value); // Keep compilers happy } |