diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-02 02:26:06 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-02 02:26:06 +0100 |
commit | 6bf1fe47276a68b0f44651a5f37a9c911d6141bd (patch) | |
tree | be6c65ef74df5b6e04575a92e951b3630c3b3426 /bgpd/bgp_route.c | |
parent | Merge pull request #227 from qlyoung/stable-no-deprecated (diff) | |
download | frr-6bf1fe47276a68b0f44651a5f37a9c911d6141bd.tar.xz frr-6bf1fe47276a68b0f44651a5f37a9c911d6141bd.zip |
bgpd: Fix memory leaks on shutdown
The original code on shutdown assumed a 'forced' mode
if there was no process_main_queue. This construct
was violated by commit 2e02b9b2d1ed29975001d6917f9f726854ec5559
due to not fully understanding the shutdown process.
If we are shutting down, don't store work to do later,
just gracefully don't do it.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r-- | bgpd/bgp_route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 353ecd693..b19fe9637 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -2062,7 +2062,7 @@ bgp_process (struct bgp *bgp, struct bgp_node *rn, afi_t afi, safi_t safi) return; if (bm->process_main_queue == NULL) - bgp_process_queue_init (); + return; pqnode = XCALLOC (MTYPE_BGP_PROCESS_QUEUE, sizeof (struct bgp_process_queue)); @@ -2087,7 +2087,7 @@ bgp_add_eoiu_mark (struct bgp *bgp) struct bgp_process_queue *pqnode; if (bm->process_main_queue == NULL) - bgp_process_queue_init (); + return; pqnode = XCALLOC (MTYPE_BGP_PROCESS_QUEUE, sizeof (struct bgp_process_queue)); |