From 9d39e4a59c3fbcad862784085fbd81d2692759f5 Mon Sep 17 00:00:00 2001 From: "hf@deer.(none)" <> Date: Thu, 28 Jul 2005 17:18:24 +0500 Subject: [PATCH] Additional fix for #12177 (stderr isn't closed) --- libmysqld/lib_sql.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index b71b442b4ca..d607e1dcf43 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -627,14 +627,14 @@ void STDCALL mysql_server_end() my_free((char*) copy_arguments_ptr, MYF(MY_ALLOW_ZERO_PTR)); copy_arguments_ptr=0; clean_up(0); + /* If library called my_init(), free memory allocated by it */ + if (!org_my_init_done) + my_end(0); if (errorlog_file) { fclose(errorlog_file); errorlog_file=0; } - /* If library called my_init(), free memory allocated by it */ - if (!org_my_init_done) - my_end(0); } my_bool STDCALL mysql_thread_init()