diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 39aae35ae190..311051ae4306 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;