diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-08-22 20:09:26 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-08-22 20:09:26 -0300 |
| commit | 5ecf5540097c30ab0b02b3ac18133b17e660c9db (patch) | |
| tree | 05f79aded0b74052c32033621b6f20e14ef418ad | |
| parent | c25445c820c2890435d41db0210e612606993a38 (diff) | |
bgpd: fix file descriptor leak
Bug introduced by commit 37d361e7. Removing the call to bgp_close()
from bgp_delete() was a mistake.
Reported-by: Don Slice <dslice@cumulusnetworks.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| -rw-r--r-- | bgpd/bgpd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 9d7c38c871..e3650417fa 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -3087,6 +3087,8 @@ int bgp_delete(struct bgp *bgp) * routes to be processed still referencing the struct bgp. */ listnode_delete(bm->bgp, bgp); + if (list_isempty(bm->bgp)) + bgp_close(); /* Deregister from Zebra, if needed */ if (IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) |
