]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Don't check for NULL when removing SRv6 SIDs 12099/head
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Tue, 11 Oct 2022 11:06:39 +0000 (13:06 +0200)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Tue, 11 Oct 2022 11:06:39 +0000 (13:06 +0200)
commit944909f4f72bdfaa76a5baa6b9c12f26435eb258
treebc52d82b8320790175e02f7c142c22cdabe38bff
parentafd4d90111125e35a6023a2ca27512396a57a33a
bgpd: Don't check for NULL when removing SRv6 SIDs

When an SRv6 locator is unset, all the SRv6 SIDs allocated from the
locator are removed. Before freeing the memory allocated for an SRv6
SID, we check if the pointer to the SID is `NULL`.

However, checking for `NULL` before freeing memory is useless.

This PR aims to improve the code's readability by removing the
useless `NULL` checks.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
bgpd/bgp_vty.c