From 9954e182a5952c5bca225576c1ec5332a29fcb01 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Thu, 1 Jan 2009 20:44:07 +0000 Subject: Call kr_shutdown() before exit even in config test mode and config parse error case. --- usr.sbin/ospfd/ospfd.c | 7 +++++-- 1 file 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 @@ -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); } -- cgit v1.2.3