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.
This commit is contained in:
Vicențiu Ciorbaru 2016-02-14 18:31:06 +02:00
parent 93e9d81efa
commit b7dc830274

View File

@ -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);
} }