summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-05-18 07:51:06 -0400
committerGitHub <noreply@github.com>2018-05-18 07:51:06 -0400
commit29be7d92cc65e685bf3e543b1033729fc7b39235 (patch)
tree8c768e3a0c3f0e205a3df300c2a0a3e9ac6c928b
parent1cbbd4950b5768353d1e976367698fc54bc8d870 (diff)
parent1e469d276c20f5bd23edafb1d2978290979dfdac (diff)
Merge pull request #2198 from LabNConsulting/working/master/bgpd-nht-crash
bgpd: fix NHT free when nht_info is null (fixes crash)
-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",