diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-07-05 23:30:54 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-07-05 21:36:46 -0500 |
commit | 36474af463d0d8ce758f827d31a378624062b955 (patch) | |
tree | 85cb2becdcd36454d9a3270248a6cfe1cd2cdc8e /src/pacman | |
parent | ae7139adcfa65991c71616e8de7910ff722d4166 (diff) |
fix segfault if pacman.conf can't be read
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman')
-rw-r--r-- | src/pacman/conf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 3af3fa5b..fac6da34 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -750,7 +750,9 @@ static int _parseconfig(const char *file, struct section_t *section, } cleanup: - fclose(fp); + if (fp) { + fclose(fp); + } pm_printf(ALPM_LOG_DEBUG, "config: finished parsing %s\n", file); return ret; } |