diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2013-07-22 02:46:53 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-08-21 11:06:41 +1000 |
commit | 4d4f46ba2a9bb168f0e5f1139738c2cf4dc260ca (patch) | |
tree | efb17b3193cd6ee6c1f9f331f658c35ac1ba6fa4 | |
parent | bf1c8e3a3c8d8becfb1f8c990d29ff459271b707 (diff) | |
download | pacman-4d4f46ba2a9bb168f0e5f1139738c2cf4dc260ca.tar.xz |
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 <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r-- | src/pacman/ini.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |