summaryrefslogtreecommitdiff
path: root/ldpd/lde_lib.c
diff options
context:
space:
mode:
authorBinu Abraham <binu_abraham@looptelecom.com>2019-07-10 15:13:08 +0800
committerBinu Abraham <binu_abraham@looptelecom.com>2019-07-15 14:05:51 +0800
commitf4ec681c8151ba75a7951db589ca5dcc6870f887 (patch)
treea5e95ff9ff19675b2e9e3fd6850ca02fbdd70a74 /ldpd/lde_lib.c
parent96e109772d064e9df9ce208b53f7ff1872e1c427 (diff)
ldpd: Fix to release MPLS label if its not used anymore
LDP should release labels allocated from zebra if its not getting used. Signed-off-by: Binu <binu_abraham@looptelecom.com>
Diffstat (limited to 'ldpd/lde_lib.c')
-rw-r--r--ldpd/lde_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ldpd/lde_lib.c b/ldpd/lde_lib.c
index 28e455c7a5..0957a5455e 100644
--- a/ldpd/lde_lib.c
+++ b/ldpd/lde_lib.c
@@ -919,6 +919,9 @@ lde_gc_timer(struct thread *thread)
!RB_EMPTY(lde_map_head, &fn->upstream))
continue;
+ if (fn->local_label != NO_LABEL)
+ lde_free_label(fn->local_label);
+
fec_remove(&ft, &fn->fec);
free(fn);
count++;