]> git.puffer.fish Git - mirror/frr.git/commitdiff
Add a null check in bgp_address_del() function when connected
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 00:40:36 +0000 (17:40 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 00:40:36 +0000 (17:40 -0700)
addresses are removed.

bgpd/bgp_nexthop.c

index f048ae28954258dcf7968bd1194f2c373ba30616..261a86ea8d2ec391c12ac0166af6bc25a8fa4f98 100644 (file)
@@ -577,6 +577,9 @@ bgp_address_add (struct prefix *p)
   tmp.addr = p->u.prefix4;
 
   addr = hash_get (bgp_address_hash, &tmp, bgp_address_hash_alloc);
+  if (!addr)
+    return;
+
   addr->refcnt++;
 }