From: Lou Berger Date: Wed, 9 May 2018 20:06:40 +0000 (-0400) Subject: bgpd: fix NHT free when nht_info is null (fixes crash) X-Git-Tag: frr-6.1-dev~425^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=1e469d276c20f5bd23edafb1d2978290979dfdac;p=matthieu%2Ffrr.git bgpd: fix NHT free when nht_info is null (fixes crash) Signed-off-by: Lou Berger --- 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",