summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-06-12 15:10:01 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-06-12 15:12:48 -0400
commitbf383464ea317027c5943e678aaabc70d285a04e (patch)
tree55c0f6eb9665d1756fcf049bf49e69f352fd1591
parent1f4b2cce9554a2634a3ec8ed9add71a2a41934f8 (diff)
bgpd: Ensure that bgp_delete bgp pointer is non-null
Crash w/ an assert if someone calls bgp_delete with a NULL parameter as opposed to crashing when we dereference the pointer a bit later. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--bgpd/bgpd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 5d858ae14f..f8903ea568 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -3300,6 +3300,7 @@ int bgp_delete(struct bgp *bgp)
afi_t afi;
int i;
+ assert(bgp);
THREAD_OFF(bgp->t_startup);
if (BGP_DEBUG(zebra, ZEBRA)) {