Commit b7dc8302 authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

Fix memory leak when failing to read config file

In the case of error during my_load_defaults, we would not free the
args array.
parent 93e9d81e
...@@ -577,6 +577,7 @@ int my_load_defaults(const char *conf_file, const char **groups, ...@@ -577,6 +577,7 @@ int my_load_defaults(const char *conf_file, const char **groups,
handle_default_option, (void *) &ctx, handle_default_option, (void *) &ctx,
dirs))) dirs)))
{ {
delete_dynamic(&args);
free_root(&alloc,MYF(0)); free_root(&alloc,MYF(0));
DBUG_RETURN(error); DBUG_RETURN(error);
} }
......
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