From 4150b124a4240cc0032294aaa6bb6996a3b9dd6d Mon Sep 17 00:00:00 2001 From: VilhoRaatikka Date: Fri, 7 Feb 2014 12:47:07 +0200 Subject: [PATCH] Bug # 397 http://bugs.skysql.com/show_bug.cgi?id=397 Avoid calling free with NULL pointer. --- server/core/gateway.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/core/gateway.c b/server/core/gateway.c index a7bcd2285..3b0bc21ea 100644 --- a/server/core/gateway.c +++ b/server/core/gateway.c @@ -486,6 +486,7 @@ static bool resolve_maxscale_homedir( log_context = strdup("MAXSCALE_HOME"); goto check_home_dir; } + free(tmp); } else { @@ -496,7 +497,6 @@ static bool resolve_maxscale_homedir( "Warning : MAXSCALE_HOME environment " "variable is not set."))); } - free(tmp); /*< * 2. if home dir wasn't specified in MAXSCALE_HOME, * try access /etc/MaxScale/