Bug # 397

http://bugs.skysql.com/show_bug.cgi?id=397

Avoid calling free with NULL pointer.
This commit is contained in:
VilhoRaatikka 2014-02-07 12:47:07 +02:00
parent 46029fc941
commit 4150b124a4

View File

@ -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/