1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 00:08:50 -05:00

check config_new return value

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Andrew Gregory 2014-03-24 09:59:42 -04:00 committed by Allan McRae
parent fb8437b588
commit b0dc547fcb

View File

@ -1045,7 +1045,10 @@ int main(int argc, char *argv[])
setuseragent(); setuseragent();
/* init config data */ /* init config data */
config = config_new(); if(!(config = config_new())) {
/* config_new prints the appropriate error message */
cleanup(1);
}
/* disable progressbar if the output is redirected */ /* disable progressbar if the output is redirected */
if(!isatty(fileno(stdout))) { if(!isatty(fileno(stdout))) {