summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIvy Foster <iff@escondida.tk>2018-02-15 23:20:40 +0100
committerAllan McRae <allan@archlinux.org>2018-03-14 03:16:58 +0100
commit0e260f9335546d5834eb3e1d37cd23bc72765162 (patch)
tree914dc3bb74cc14f5f2d8df5759073b06ad55024e /src
parent2dd8b88d5cbb04ccab528cdd7b6b4db04c514748 (diff)
downloadpacman-0e260f9335546d5834eb3e1d37cd23bc72765162.tar.gz
pacman-0e260f9335546d5834eb3e1d37cd23bc72765162.tar.xz
pacman-conf.c: exit if cannot create config data structure
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/pacman-conf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pacman/pacman-conf.c b/src/pacman/pacman-conf.c
index ab73d896..4ffa24a3 100644
--- a/src/pacman/pacman-conf.c
+++ b/src/pacman/pacman-conf.c
@@ -400,7 +400,10 @@ int main(int argc, char **argv)
{
int ret = 0;
- config = config_new();
+ if(!(config = config_new())) {
+ /* config_new prints the appropriate error message */
+ return 1;
+ }
parse_opts(argc, argv);
if(!config) {
ret = 1;