summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-06-07 15:43:16 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-06-07 15:43:16 +0300
commitdd4957965411c1b67ebfb1ba8650a3090d305f63 (patch)
treec501de5e91f27a583fa533a32bc71be491601878
parenteeb028bbc1695b8727ee9e58c173c85f1abcb29c (diff)
downloadmariadb-git-dd4957965411c1b67ebfb1ba8650a3090d305f63.tar.gz
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.
-rw-r--r--sql/mysqld.cc1
1 files changed, 1 insertions, 0 deletions
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