summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2017-08-23 21:45:53 +0200
committerGitHub <noreply@github.com>2017-08-23 21:45:53 +0200
commite1b9b080b87467dffac42abded32e4ca005e84ea (patch)
tree05f79aded0b74052c32033621b6f20e14ef418ad
parentMerge pull request #1028 from opensourcerouting/mpls_label_stack (diff)
parentbgpd: fix file descriptor leak (diff)
downloadfrr-e1b9b080b87467dffac42abded32e4ca005e84ea.tar.xz
frr-e1b9b080b87467dffac42abded32e4ca005e84ea.zip
Merge pull request #1030 from opensourcerouting/bgpd-fd-leak
bgpd: fix file descriptor leak
-rw-r--r--bgpd/bgpd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 9d7c38c87..e3650417f 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))