Commit 2a478178 authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

MDEV-9225 mysql_upgrade segfault due to missing /etc/my.cnf.d

In case of missing includedir file, we would attempt to free a NULL
pointer. Make sure to guard against that.
parent b7dc8302
...@@ -182,7 +182,8 @@ static const char *load_default_groups[]= ...@@ -182,7 +182,8 @@ static const char *load_default_groups[]=
static void free_used_memory(void) static void free_used_memory(void)
{ {
/* Free memory allocated by 'load_defaults' */ /* Free memory allocated by 'load_defaults' */
free_defaults(defaults_argv); if (defaults_argv)
free_defaults(defaults_argv);
dynstr_free(&ds_args); dynstr_free(&ds_args);
dynstr_free(&conn_args); dynstr_free(&conn_args);
......
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