summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-07-06 22:24:05 +0200
committerGitHub <noreply@github.com>2023-07-06 22:24:05 +0200
commit30f511e63ac853465be7114322282fb5d833fa0c (patch)
treefe80180ce097a2580582469941b98a07176736c7
parentMerge pull request #13926 from SaiGomathiN/querinterval (diff)
parentbgpd: Fix memory leak (diff)
downloadfrr-30f511e63ac853465be7114322282fb5d833fa0c.tar.xz
frr-30f511e63ac853465be7114322282fb5d833fa0c.zip
Merge pull request #13925 from Keelan10/bgpd-leak
bgpd: Fix memory leak
-rw-r--r--bgpd/bgp_evpn_vty.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c
index ae9e75b23..77a997d17 100644
--- a/bgpd/bgp_evpn_vty.c
+++ b/bgpd/bgp_evpn_vty.c
@@ -2292,6 +2292,9 @@ static void evpn_configure_vrf_rd(struct bgp *bgp_vrf, struct prefix_rd *rd,
*/
bgp_evpn_handle_vrf_rd_change(bgp_vrf, 1);
+ if (bgp_vrf->vrf_prd_pretty)
+ XFREE(MTYPE_BGP, bgp_vrf->vrf_prd_pretty);
+
/* update RD */
memcpy(&bgp_vrf->vrf_prd, rd, sizeof(struct prefix_rd));
bgp_vrf->vrf_prd_pretty = XSTRDUP(MTYPE_BGP, rd_pretty);