diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2024-08-08 12:01:14 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2024-08-08 14:24:59 -0400 |
| commit | 5891afb8246a860b70f60a5cf39dcd3a357eb663 (patch) | |
| tree | 2e6e98ea9ce46cbb147d5c453ccd9492341d2733 /sharpd | |
| parent | 000ad7ff987e592be7abef86d6c00ac711dd0cc2 (diff) | |
sharpd: Eliminate leaked list for locator-chunks
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'sharpd')
| -rw-r--r-- | sharpd/sharp_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sharpd/sharp_main.c b/sharpd/sharp_main.c index f4ce147978..2e72a4b990 100644 --- a/sharpd/sharp_main.c +++ b/sharpd/sharp_main.c @@ -65,9 +65,18 @@ static void sharp_global_init(void) sg.srv6_locators = list_new(); } +static void sharp_srv6_locators_list_delete(void *item) +{ + struct sharp_srv6_locator *loc = item; + + list_delete(&loc->chunks); +} + static void sharp_global_destroy(void) { list_delete(&sg.nhs); + + sg.srv6_locators->del = sharp_srv6_locators_list_delete; list_delete(&sg.srv6_locators); } |
