summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2018-05-09 16:06:40 -0400
committerLou Berger <lberger@labn.net>2018-05-09 16:07:36 -0400
commit1e469d276c20f5bd23edafb1d2978290979dfdac (patch)
tree59fef30e0f3db104219090d96588cee8da03c2b2
parent1c96f2fb9631415ec44046c915520f489a93ebc4 (diff)
bgpd: fix NHT free when nht_info is null (fixes crash)
Signed-off-by: Lou Berger <lberger@labn.net>
-rw-r--r--bgpd/bgp_nht.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index 8b6ff3fa22..2c9e379299 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -88,7 +88,7 @@ int bgp_find_nexthop(struct bgp_info *path, int connected)
static void bgp_unlink_nexthop_check(struct bgp_nexthop_cache *bnc)
{
- if (LIST_EMPTY(&(bnc->paths)) && !bnc->nht_info) {
+ if (LIST_EMPTY(&(bnc->paths)) && bnc->nht_info) {
if (BGP_DEBUG(nht, NHT)) {
char buf[PREFIX2STR_BUFFER];
zlog_debug("bgp_unlink_nexthop: freeing bnc %s",