summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_mplsvpn.c
diff options
context:
space:
mode:
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>2022-10-29 17:23:59 +0200
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>2022-10-29 17:23:59 +0200
commita1d5e05fb30075edbdbfbf0ea3a2200dbf77acf2 (patch)
treecae4cbe0a6202ac62150ec5e6ecc683c35af4d13 /bgpd/bgp_mplsvpn.c
parentlib, bgpd: Enhance `srv6_locator_chunk_free()` API (diff)
downloadfrr-a1d5e05fb30075edbdbfbf0ea3a2200dbf77acf2.tar.xz
frr-a1d5e05fb30075edbdbfbf0ea3a2200dbf77acf2.zip
bgpd: Do not set chunk pointer to NULL after free
`srv6_locator_chunk_free()` takes care of freeing the memory allocated for a `struct srv6_locator_chunk` and setting the `struct srv6_locator_chunk` pointer to NULL. It is not necessary to explicitly set the pointer to NULL after invoking `srv6_locator_chunk_free()`. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Diffstat (limited to 'bgpd/bgp_mplsvpn.c')
-rw-r--r--bgpd/bgp_mplsvpn.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c
index ad4221d13..97c040e2e 100644
--- a/bgpd/bgp_mplsvpn.c
+++ b/bgpd/bgp_mplsvpn.c
@@ -892,7 +892,6 @@ void delete_vrf_tovpn_sid_per_af(struct bgp *bgp_vpn, struct bgp *bgp_vrf,
return;
srv6_locator_chunk_free(&bgp_vrf->vpn_policy[afi].tovpn_sid_locator);
- bgp_vrf->vpn_policy[afi].tovpn_sid_locator = NULL;
if (bgp_vrf->vpn_policy[afi].tovpn_sid) {
sid_unregister(bgp_vrf, bgp_vrf->vpn_policy[afi].tovpn_sid);
@@ -920,7 +919,6 @@ void delete_vrf_tovpn_sid_per_vrf(struct bgp *bgp_vpn, struct bgp *bgp_vrf)
return;
srv6_locator_chunk_free(&bgp_vrf->tovpn_sid_locator);
- bgp_vrf->tovpn_sid_locator = NULL;
if (bgp_vrf->tovpn_sid) {
sid_unregister(bgp_vrf, bgp_vrf->tovpn_sid);