summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <cvicentiu@gmail.com>2016-02-14 18:31:06 +0200
committerVicențiu Ciorbaru <cvicentiu@gmail.com>2016-02-14 18:31:48 +0200
commitb7dc830274d78cc191d7d29bcdd988dd10cd8c49 (patch)
tree4d4c5e299121113d075daaf570be524bf487a7ad /mysys
parent93e9d81efa7ed1f66b08da73962c83b8fefd8d21 (diff)
downloadmariadb-git-b7dc830274d78cc191d7d29bcdd988dd10cd8c49.tar.gz
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.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/default.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mysys/default.c b/mysys/default.c
index f23594736d6..39c9b0226f2 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -577,6 +577,7 @@ int my_load_defaults(const char *conf_file, const char **groups,
handle_default_option, (void *) &ctx,
dirs)))
{
+ delete_dynamic(&args);
free_root(&alloc,MYF(0));
DBUG_RETURN(error);
}