summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/ldpe.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-05-23 15:20:22 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-05-23 15:20:22 +0000
commit930ffb11c330d96ed42b6192bccfc7381bfd4c14 (patch)
treeaf1048c824d0f30ab728cf9d00fbd929740a4c19 /usr.sbin/ldpd/ldpe.c
parentcf2d64233cf03291527de80044fc59c1570af1d7 (diff)
Clear the configuration before closing the network sockets.
This fixes some errors and warnings when ldpd is shutting down.
Diffstat (limited to 'usr.sbin/ldpd/ldpe.c')
-rw-r--r--usr.sbin/ldpd/ldpe.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/ldpd/ldpe.c b/usr.sbin/ldpd/ldpe.c
index ecaae74d995..1042c17a080 100644
--- a/usr.sbin/ldpd/ldpe.c
+++ b/usr.sbin/ldpd/ldpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpe.c,v 1.44 2016/05/23 15:14:07 renato Exp $ */
+/* $OpenBSD: ldpe.c,v 1.45 2016/05/23 15:20:21 renato Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -287,6 +287,7 @@ ldpe_shutdown(void)
struct if_addr *if_addr;
control_cleanup();
+ config_clear(leconf);
event_del(&pfkey_ev);
event_del(&disc_ev);
@@ -303,8 +304,6 @@ ldpe_shutdown(void)
free(if_addr);
}
- config_clear(leconf);
-
/* clean up */
msgbuf_write(&iev_lde->ibuf.w);
msgbuf_clear(&iev_lde->ibuf.w);