summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-05-23 14:54:30 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-06-12 15:12:48 -0400
commit1f4b2cce9554a2634a3ec8ed9add71a2a41934f8 (patch)
tree5063522ee871c4a88cd24e75ef32b6636c6804bc
parent0e42e319d53ed3a4ffed4fc074f486974b4a4f7e (diff)
bgpd: bgp_default may be null
The bgp_default variable when saved to the side might actually be NULL. Ticket: CM-21119 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--bgpd/bgp_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index 1740f3d1db..2327e262a1 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -188,7 +188,8 @@ static __attribute__((__noreturn__)) void bgp_exit(int status)
continue;
bgp_delete(bgp);
}
- bgp_delete(bgp_default);
+ if (bgp_default)
+ bgp_delete(bgp_default);
/* reverse bgp_dump_init */
bgp_dump_finish();