diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-01-01 20:44:07 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-01-01 20:44:07 +0000 |
commit | 9954e182a5952c5bca225576c1ec5332a29fcb01 (patch) | |
tree | 1d479db5ce99d923019a357ef8f6e97b3296d7da | |
parent | 9269720bbdc1c75d72a3e41d22f7a1bfce4603ca (diff) |
Call kr_shutdown() before exit even in config test mode and config parse
error case.
-rw-r--r-- | usr.sbin/ospfd/ospfd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/ospfd.c b/usr.sbin/ospfd/ospfd.c index e07b942d790..2607e229ac5 100644 --- a/usr.sbin/ospfd/ospfd.c +++ b/usr.sbin/ospfd/ospfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfd.c,v 1.58 2008/11/24 18:28:02 claudio Exp $ */ +/* $OpenBSD: ospfd.c,v 1.59 2009/01/01 20:44:06 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -194,14 +194,17 @@ main(int argc, char *argv[]) kif_init(); /* parse config file */ - if ((ospfd_conf = parse_config(conffile, opts)) == NULL ) + if ((ospfd_conf = parse_config(conffile, opts)) == NULL) { + kr_shutdown(); exit(1); + } if (ospfd_conf->opts & OSPFD_OPT_NOACTION) { if (ospfd_conf->opts & OSPFD_OPT_VERBOSE) print_config(ospfd_conf); else fprintf(stderr, "configuration OK\n"); + kr_shutdown(); exit(0); } |