Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-07-22 02:46:53 -0400
committerAllan McRae <allan@archlinux.org>2013-08-21 11:06:41 +1000
commit4d4f46ba2a9bb168f0e5f1139738c2cf4dc260ca (patch)
treeefb17b3193cd6ee6c1f9f331f658c35ac1ba6fa4 /src
parentbf1c8e3a3c8d8becfb1f8c990d29ff459271b707 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/ini.c6
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;
}