From dd4957965411c1b67ebfb1ba8650a3090d305f63 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 7 Jun 2011 15:43:16 +0300 Subject: [PATCH] Bug #12589928: MEMORY LEAK WHEN RUNNING SYS_VARS.SECURE_FILE_PRIV This is the 5.1 version of the fix. Need to free the memory allocated by the option parsing code for empty strings when resetting the pointer to NULL. No test case needed, as the existing ones already cover this path. --- sql/mysqld.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 36f195e6232..13395cd9e07 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -9063,6 +9063,7 @@ static int fix_paths(void) { if (*opt_secure_file_priv == 0) { + my_free(opt_secure_file_priv, MYF(0)); opt_secure_file_priv= 0; } else