Skip to content

Commit

Permalink
Merge pull request #17687 from FRRouting/mergify/bp/stable/10.1/pr-17669
Browse files Browse the repository at this point in the history
bgpd: fix memory leak when reconfiguring a route distinguisher (backport #17669)
  • Loading branch information
ton31337 authored Dec 21, 2024
2 parents d4db705 + d78b288 commit ff61f9a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bgpd/bgp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -9708,6 +9708,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;
Expand Down

0 comments on commit ff61f9a

Please sign in to comment.