Commit dd495796 authored by Georgi Kodinov's avatar Georgi Kodinov

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.
parent eeb028bb
...@@ -9063,6 +9063,7 @@ static int fix_paths(void) ...@@ -9063,6 +9063,7 @@ static int fix_paths(void)
{ {
if (*opt_secure_file_priv == 0) if (*opt_secure_file_priv == 0)
{ {
my_free(opt_secure_file_priv, MYF(0));
opt_secure_file_priv= 0; opt_secure_file_priv= 0;
} }
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment