[pacman-dev] [PATCH] fix segfault if pacman.conf can't be read
5 Jul
2011
5 Jul
'11
9:47 p.m.
Signed-off-by: Florian Pritz <bluewind@xinu.at> --- 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 3af3fa5..fac6da3 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; } -- 1.7.6
4943
Age (days ago)
4943
Last active (days ago)
0 comments
1 participants
participants (1)
-
Florian Pritz