]> git.puffer.fish Git - matthieu/frr.git/commit
zebra: Fix memory leak in SRv6 locator delete
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Tue, 23 Aug 2022 20:40:47 +0000 (22:40 +0200)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Wed, 24 Aug 2022 06:38:22 +0000 (08:38 +0200)
commit0a584672517a73e9d5ed5485941143036b28d290
tree7e4149f96c785383f41d11fa3cadaf82515644f6
parentc143b875193c0ec4eaaeb1f0ddb2c744bd04ba3c
zebra: Fix memory leak in SRv6 locator delete

Running `srv6_locator` topotest with `--valgrind-memleaks` gives several
memory leak errors. This is due to the way SRv6 locators are deleted:
when an SRv6 locator is deleted, it is removed from the SRv6 locators
list (`srv6->locators`), but the memory allocated for the SRv6 locator
is not freed.

This patch adds a call to the `srv6_locator_free()` function to properly
free the allocated memory when an SRv6 locator is removed.

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