Merge pull request #16557 from donaldsharp/pathd_shutdown_memory_leaks

pathd: Cleanup shutdown memory leaks
This commit is contained in:
Donatas Abraitis 2024-08-12 23:45:32 +03:00 committed by GitHub
commit b4e4fb476a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -148,6 +148,16 @@ void srte_segment_list_del(struct srte_segment_list *segment_list)
XFREE(MTYPE_PATH_SEGMENT_LIST, segment_list);
}
static void srte_segment_list_terminate(void)
{
while (!RB_EMPTY(srte_segment_list_head, &srte_segment_lists)) {
struct srte_segment_list *sl = RB_ROOT(srte_segment_list_head,
&srte_segment_lists);
srte_segment_list_del(sl);
}
}
/**
* Search for a segment list by name.
*
@ -1281,6 +1291,11 @@ void pathd_shutdown(void)
{
path_ted_teardown();
srte_clean_zebra();
srte_segment_list_terminate();
vrf_terminate();
frr_fini();
}