diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2014-03-24 14:59:42 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-03-27 06:16:52 +0100 |
commit | b0dc547fcbc3e4b0116f8982d500635ebdeb506c (patch) | |
tree | 4380cbe31c3400241803b4ef82d982ba982c2f69 | |
parent | fb8437b588356f2efd9dd093a304edc3a1859a1d (diff) | |
download | pacman-b0dc547fcbc3e4b0116f8982d500635ebdeb506c.tar.gz pacman-b0dc547fcbc3e4b0116f8982d500635ebdeb506c.tar.xz |
check config_new return value
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r-- | src/pacman/pacman.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 9791ced6..ef86d39a 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -1045,7 +1045,10 @@ int main(int argc, char *argv[]) setuseragent(); /* 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 */ if(!isatty(fileno(stdout))) { |