summaryrefslogtreecommitdiff
path: root/lib/command_py.c
diff options
context:
space:
mode:
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>2022-08-24 00:25:17 +0200
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>2022-08-24 14:22:04 +0200
commita0c47583a43138f32cf4c1a3691c289d46ba2933 (patch)
tree7b1307c6698ff286c1ae3c0c2647983e842c41e7 /lib/command_py.c
parentf8e9c702a17d6b5642078305436ad9b8920a119a (diff)
sharpd: Fix memory leak in release-locator-chunk
Running the `zebra_seg6local_route` topotest with `--valgrind-memleaks` gives several memory leak errors. This is due to the way SRv6 chunks are released: when the user executes the CLI command `sharp srv6-manager release-locator-chunk` to release the chunks of an SRv6 locator, all the chunks are removed from the list `loc->chunks`. Also, the locator is removed from the SRv6 locators list `sg.srv6_locators`, but the memory allocated for the locator is not freed. This patch adds a call to `XFREE()` to properly free the allocated memory when all the chunks of an SRv6 locator are removed and the locator is removed as well. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Diffstat (limited to 'lib/command_py.c')
0 files changed, 0 insertions, 0 deletions