summaryrefslogtreecommitdiffstats
path: root/sharpd/sharp_main.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-08-08 18:01:14 +0200
committerDonald Sharp <sharpd@nvidia.com>2024-08-08 20:24:59 +0200
commit5891afb8246a860b70f60a5cf39dcd3a357eb663 (patch)
tree2e6e98ea9ce46cbb147d5c453ccd9492341d2733 /sharpd/sharp_main.c
parentMerge pull request #16526 from opensourcerouting/fix/invalid_escape_chars_frr... (diff)
downloadfrr-5891afb8246a860b70f60a5cf39dcd3a357eb663.tar.xz
frr-5891afb8246a860b70f60a5cf39dcd3a357eb663.zip
sharpd: Eliminate leaked list for locator-chunks
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to '')
-rw-r--r--sharpd/sharp_main.c9
1 files changed, 9 insertions, 0 deletions
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);
}