Fix some potential memory leaks

This commit is contained in:
Peter Bui
2011-08-08 21:44:39 -04:00
committed by Michael Stapelberg
parent 6fb5d6e313
commit 5e06b1b21d
5 changed files with 11 additions and 3 deletions

View File

@ -193,6 +193,7 @@ static char *get_config_path(const char *override_configpath) {
config_path = resolve_tilde("~/.i3/config");
if (path_exists(config_path))
return config_path;
free(config_path);
/* 2: check for $XDG_CONFIG_HOME/i3/config */
if ((xdg_config_home = getenv("XDG_CONFIG_HOME")) == NULL)