diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2024-08-12 10:14:31 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2024-08-12 10:14:31 -0400 |
| commit | 33af3c027862ae8bd4524e8df0f4ac608b3f8db2 (patch) | |
| tree | cbd458c2a4be4e724f8440c92171733ee07fc35d /pathd | |
| parent | cc0fdd3b1d1b3554896fc03eec16379b7bae2b40 (diff) | |
pathd: Cleanup shutdown memory leaks
Just some code to cleanup the shutdown memory leaks
that are in pathd.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pathd')
| -rw-r--r-- | pathd/pathd.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pathd/pathd.c b/pathd/pathd.c index 6c13503c7d..9bb7dbae84 100644 --- a/pathd/pathd.c +++ b/pathd/pathd.c @@ -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(); } |
