diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-12-20 15:15:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-20 15:15:15 +0100 |
commit | 7f4374fefc342c29f450a2214e8e9a2ba706a59b (patch) | |
tree | d602fd89fc1f723dbd9c936190b9dae864ca847b /bgpd/bgp_vty.c | |
parent | Merge pull request #17673 from Jafaral/pim-coverity (diff) | |
parent | bgpd: fix memory leak when reconfiguring a route distinguisher (diff) | |
download | frr-7f4374fefc342c29f450a2214e8e9a2ba706a59b.tar.xz frr-7f4374fefc342c29f450a2214e8e9a2ba706a59b.zip |
Merge pull request #17669 from pguibert6WIND/rdvpn_mem_leak
bgpd: fix memory leak when reconfiguring a route distinguisher
Diffstat (limited to 'bgpd/bgp_vty.c')
-rw-r--r-- | bgpd/bgp_vty.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 39aae35ae..311051ae4 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -9806,6 +9806,8 @@ DEFPY (af_rd_vpn_export, bgp_get_default(), bgp); if (yes) { + if (bgp->vpn_policy[afi].tovpn_rd_pretty) + XFREE(MTYPE_BGP_NAME, bgp->vpn_policy[afi].tovpn_rd_pretty); bgp->vpn_policy[afi].tovpn_rd_pretty = XSTRDUP(MTYPE_BGP_NAME, rd_str); bgp->vpn_policy[afi].tovpn_rd = prd; |