diff options
author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2022-10-29 17:23:59 +0200 |
---|---|---|
committer | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2022-10-29 17:23:59 +0200 |
commit | a1d5e05fb30075edbdbfbf0ea3a2200dbf77acf2 (patch) | |
tree | cae4cbe0a6202ac62150ec5e6ecc683c35af4d13 /bgpd/bgp_mplsvpn.c | |
parent | lib, bgpd: Enhance `srv6_locator_chunk_free()` API (diff) | |
download | frr-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.c | 2 |
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); |