Skip to content

Commit

Permalink
Merge pull request #17689 from FRRouting/mergify/bp/stable/10.2/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
Jafaral authored Dec 20, 2024
2 parents 1437880 + 87c3281 commit d44afa1
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 @@ -9816,6 +9816,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 d44afa1

Please sign in to comment.