summaryrefslogtreecommitdiff
path: root/sql
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
commit8e14d52610d747977bcbe2875cbe7d93724d8143 (patch)
treec501de5e91f27a583fa533a32bc71be491601878 /sql
parent7759826ea96c0ae627b63cf398238cde50a8b5bf (diff)
downloadmariadb-git-8e14d52610d747977bcbe2875cbe7d93724d8143.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.
Diffstat (limited to 'sql')
-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