diff options
author | Donald Sharp <sharpd@nvidia.com> | 2023-11-12 04:58:16 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2023-11-13 15:16:45 +0100 |
commit | b8fdedc6b8ca7b8a75805b78aa6e7b48714ab3ec (patch) | |
tree | 824b5f05715daaaaf20a8572c97fb497970aa6e7 /ospf6d/ospf6_top.c | |
parent | ospfd: Cleanup route-map memory (diff) | |
download | frr-b8fdedc6b8ca7b8a75805b78aa6e7b48714ab3ec.tar.xz frr-b8fdedc6b8ca7b8a75805b78aa6e7b48714ab3ec.zip |
ospf6d: Cleanup memory on shutdown
some list data structures were never freed
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospf6d/ospf6_top.c')
-rw-r--r-- | ospf6d/ospf6_top.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index aa0625814..ef312cbe3 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -486,6 +486,7 @@ void ospf6_delete(struct ospf6 *o) struct ospf6_area *oa; struct vrf *vrf; struct ospf6_external_aggr_rt *aggr; + uint32_t i; QOBJ_UNREG(o); @@ -532,6 +533,13 @@ void ospf6_delete(struct ospf6 *o) } route_table_finish(o->rt_aggr_tbl); + for (i = 0; i <= ZEBRA_ROUTE_MAX; i++) { + if (!o->redist[i]) + continue; + + list_delete(&o->redist[i]); + } + XFREE(MTYPE_OSPF6_TOP, o->name); XFREE(MTYPE_OSPF6_TOP, o); } @@ -576,6 +584,11 @@ void ospf6_master_init(struct event_loop *master) om6->master = master; } +void ospf6_master_delete(void) +{ + list_delete(&om6->ospf6); +} + static void ospf6_maxage_remover(struct event *thread) { struct ospf6 *o = (struct ospf6 *)EVENT_ARG(thread); |