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>
This commit is contained in:
parent
ae7139adcf
commit
36474af463
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue