From 5891afb8246a860b70f60a5cf39dcd3a357eb663 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 8 Aug 2024 12:01:14 -0400 Subject: sharpd: Eliminate leaked list for locator-chunks Signed-off-by: Donald Sharp --- sharpd/sharp_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sharpd/sharp_main.c') diff --git a/sharpd/sharp_main.c b/sharpd/sharp_main.c index f4ce14797..2e72a4b99 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); } -- cgit v1.2.3