Double freeing memory.
This commit is contained in:
@ -477,7 +477,6 @@ static bool resolve_maxscale_homedir(
|
|||||||
{
|
{
|
||||||
tmp = strndup(getenv("MAXSCALE_HOME"), PATH_MAX);
|
tmp = strndup(getenv("MAXSCALE_HOME"), PATH_MAX);
|
||||||
get_expanded_pathname(p_home_dir, tmp, NULL);
|
get_expanded_pathname(p_home_dir, tmp, NULL);
|
||||||
free(tmp);
|
|
||||||
|
|
||||||
if (*p_home_dir != NULL)
|
if (*p_home_dir != NULL)
|
||||||
{
|
{
|
||||||
@ -493,6 +492,7 @@ static bool resolve_maxscale_homedir(
|
|||||||
"Warning : MAXSCALE_HOME environment "
|
"Warning : MAXSCALE_HOME environment "
|
||||||
"variable is not set.");
|
"variable is not set.");
|
||||||
}
|
}
|
||||||
|
free(tmp);
|
||||||
/**
|
/**
|
||||||
* 2. if home dir wasn't specified in MAXSCALE_HOME,
|
* 2. if home dir wasn't specified in MAXSCALE_HOME,
|
||||||
* try access /etc/MaxScale/
|
* try access /etc/MaxScale/
|
||||||
@ -505,7 +505,7 @@ static bool resolve_maxscale_homedir(
|
|||||||
log_context = strdup("/etc/MaxScale");
|
log_context = strdup("/etc/MaxScale");
|
||||||
goto check_home_dir;
|
goto check_home_dir;
|
||||||
}
|
}
|
||||||
|
free(tmp);
|
||||||
/**
|
/**
|
||||||
* 3. if /etc/MaxScale/MaxScale.cnf didn't exist or wasn't accessible, home
|
* 3. if /etc/MaxScale/MaxScale.cnf didn't exist or wasn't accessible, home
|
||||||
* isn't specified. Thus, try to access $PWD/MaxScale.cnf .
|
* isn't specified. Thus, try to access $PWD/MaxScale.cnf .
|
||||||
|
|||||||
Reference in New Issue
Block a user