summaryrefslogtreecommitdiff
path: root/bgpd/bgp_lcommunity.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_lcommunity.c')
-rw-r--r--bgpd/bgp_lcommunity.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_lcommunity.c b/bgpd/bgp_lcommunity.c
index ec7d07fe73..f47ae91663 100644
--- a/bgpd/bgp_lcommunity.c
+++ b/bgpd/bgp_lcommunity.c
@@ -46,6 +46,8 @@ void lcommunity_free(struct lcommunity **lcom)
{
XFREE(MTYPE_LCOMMUNITY_VAL, (*lcom)->val);
XFREE(MTYPE_LCOMMUNITY_STR, (*lcom)->str);
+ if ((*lcom)->json)
+ json_object_free((*lcom)->json);
XFREE(MTYPE_LCOMMUNITY, *lcom);
}