diff --git a/mysys/my_init.c b/mysys/my_init.c
index f28f47e090ed495855231ea2b3e9f253d68a82dc..c2bfdde0ddd530e5739d0c45d5144b207aef6fd3 100644
--- a/mysys/my_init.c
+++ b/mysys/my_init.c
@@ -152,6 +152,7 @@ void my_end(int infoflag)
       DBUG_PRINT("error",("%s",errbuff[0]));
     }
   }
+  free_charsets();
   my_once_free();
 
   if ((infoflag & MY_GIVE_INFO) || print_info)