diff -up dvdauthor/src/conffile.c~ dvdauthor/src/conffile.c --- dvdauthor/src/conffile.c~ 2010-04-08 08:43:24.000000000 +0300 +++ dvdauthor/src/conffile.c 2010-11-08 20:39:13.497409429 +0200 @@ -76,6 +76,8 @@ static char * xdg_get_config_home(void) if (result == 0) { to_dispose = xdg_make_home_relative(".config"); + if (to_dispose == 0) + return result; result = to_dispose; } /*if*/ if (result != 0 && to_dispose == 0) @@ -248,7 +250,7 @@ static int xdg_for_each_config_found context.actionarg = actionarg; do /*once*/ { - if (forwards) + if (home_path != 0 && forwards) { status = xdg_for_each_config_found_try_component ( @@ -269,7 +271,7 @@ static int xdg_for_each_config_found ); if (status != 0) break; - if (!forwards) + if (home_path != 0 && !forwards) { status = xdg_for_each_config_found_try_component ( @@ -282,7 +284,8 @@ static int xdg_for_each_config_found } /*if*/ } while (false); - free((void *)home_path); + if (home_path != 0) + free((void *)home_path); free((void *)search_path); return status;