From 82b20cf043efc099a8fae6eb9355f346147f0675 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Tue, 14 Jun 2005 15:01:52 +0000 Subject: Don't unref something that is used later. send_rtmsg() will call rtlabel_id2name() so call rtlable_unref() after that. OK henning@ --- usr.sbin/bgpd/kroute.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c index 5404086dfbd..d49c6024178 100644 --- a/usr.sbin/bgpd/kroute.c +++ b/usr.sbin/bgpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.137 2005/06/13 21:16:18 henning Exp $ */ +/* $OpenBSD: kroute.c,v 1.138 2005/06/14 15:01:51 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -279,11 +279,11 @@ kr_delete(struct kroute_label *kl) htonl(INADDR_LOOPBACK & IN_CLASSA_NET)) return (0); - rtlabel_unref(kl->kr.labelid); - if (send_rtmsg(kr_state.fd, RTM_DELETE, &kl->kr) == -1) return (-1); + rtlabel_unref(kl->kr.labelid); + if (kroute_remove(kr) == -1) return (-1); -- cgit v1.2.3