Skip to content

Commit

Permalink
Merge pull request #17669 from pguibert6WIND/rdvpn_mem_leak
Browse files Browse the repository at this point in the history
bgpd: fix memory leak when reconfiguring a route distinguisher
  • Loading branch information
ton31337 authored Dec 20, 2024
2 parents f438329 + 0dd9628 commit 7f4374f
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 @@ -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;
Expand Down

0 comments on commit 7f4374f

Please sign in to comment.