summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pacman/conf.c4
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;
}