From 4d4f46ba2a9bb168f0e5f1139738c2cf4dc260ca Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Mon, 22 Jul 2013 02:46:53 -0400 Subject: ini.c: make errors in includes fatal If an error in the main file would be fatal there is little reason to ignore the error in an included file. Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- src/pacman/ini.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pacman/ini.c b/src/pacman/ini.c index 2c73d936..2e677e00 100644 --- a/src/pacman/ini.c +++ b/src/pacman/ini.c @@ -153,8 +153,12 @@ static int _parse_ini(const char *file, ini_parser_fn cb, void *data, for(gindex = 0; gindex < globbuf.gl_pathc; gindex++) { pm_printf(ALPM_LOG_DEBUG, "config file %s, line %d: including %s\n", file, linenum, globbuf.gl_pathv[gindex]); - _parse_ini(globbuf.gl_pathv[gindex], cb, data, + ret =_parse_ini(globbuf.gl_pathv[gindex], cb, data, section_name, line, depth + 1); + if(ret) { + globfree(&globbuf); + goto cleanup; + } } break; } -- cgit v1.2.3-24-g4f1b