mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-10-24 10:21:00 +00:00
Running the `zebra_seg6local_route` topotest with `--valgrind-memleaks` gives several memory leak errors. This is due to the way SRv6 routes (seg6 and seg6local routes) are handled: when the user executes the CLI command `sharp install seg6-routes` or `sharp install seg6local-routes` to create a seg6 or seg6local route, sharpd calls `nexthop_add_srv6_seg6` or `nexthop_add_srv6_seg6local` to create an SRv6 nexthop. A pointer to the SRv6 nexthop is stored in the global data structure `sg.r.nhop`. If you call `sharp install routes`, `sharp install seg6-routes` or `sharp install seg6local-routes` to create more routes, `sg.r.nhop` is set to zero and the pointer to the SRv6 nexthop contained in `sg.r.nhop` is definitely lost and the allocated memory is never freed. This patch adds calls to `nexthop_del_srv6_seg6()` and `nexthop_del_srv6_seg6local()` to free the memory allocated for the SRv6 nexthop before clearing the `sg.r.nhop` data structure. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| Makefile | ||
| sharp_globals.h | ||
| sharp_logpump.c | ||
| sharp_main.c | ||
| sharp_nht.c | ||
| sharp_nht.h | ||
| sharp_vty.c | ||
| sharp_vty.h | ||
| sharp_zebra.c | ||
| sharp_zebra.h | ||
| subdir.am | ||