free unused path strings. always pass in malloc'd memory, cuz it is going to be freed later.
Dana Jansens danakj@orodu.net
1 files changed,
4 insertions(+),
2 deletions(-)
jump to
M
parser/parse.c
→
parser/parse.c
@@ -335,6 +335,8 @@ return list;
if (!g_slist_find_custom(list, data, (GCompareFunc) slist_path_cmp)) list = func(list, data); + else + g_free(data); return list; }@@ -389,7 +391,7 @@ g_strdup(CONFIGDIR),
(GSListFunc) g_slist_append); } xdg_config_dir_paths = slist_path_add(xdg_config_dir_paths, - xdg_config_home_path, + g_strdup(xdg_config_home_path), (GSListFunc) g_slist_prepend); path = g_getenv("XDG_DATA_DIRS");@@ -411,7 +413,7 @@ g_strdup(DATADIR),
(GSListFunc) g_slist_append); } xdg_data_dir_paths = slist_path_add(xdg_data_dir_paths, - xdg_data_home_path, + g_strdup(xdg_data_home_path), (GSListFunc) g_slist_prepend); }