From b7dc830274d78cc191d7d29bcdd988dd10cd8c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Sun, 14 Feb 2016 18:31:06 +0200 Subject: [PATCH] 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. --- mysys/default.c | 1 + 1 file changed, 1 insertion(+) 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); }