diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-04 08:04:00 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-10 12:35:30 -0400 |
| commit | 7f7f77a01b1b494f0e06f8567d3c491de2a79c2b (patch) | |
| tree | 56dc34d9b3d27e37af93b8855bc8d0473296c85d | |
| parent | 3e7a9652355b36da31911c4aed63250e0050b54b (diff) | |
ospfd: Free memory associated with ospf instance startup
We have memory that is initialized upon ospf instance
and area startup. Free it up on shutdown.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| -rw-r--r-- | ospfd/ospfd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 24d3abf2a7..069ba96be6 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -634,6 +634,7 @@ static void ospf_finish_final(struct ospf *ospf) /* Reset interface. */ for (ALL_LIST_ELEMENTS(ospf->oiflist, node, nnode, oi)) ospf_if_free(oi); + list_delete(ospf->oiflist); /* De-Register VRF */ ospf_zebra_vrf_deregister(ospf); @@ -768,6 +769,8 @@ static void ospf_finish_final(struct ospf *ospf) if (!CHECK_FLAG(om->options, OSPF_MASTER_SHUTDOWN)) instance = ospf->instance; + list_delete(ospf->oi_write_q); + ospf_delete(ospf); if (ospf->name) { @@ -828,6 +831,8 @@ static void ospf_area_free(struct ospf_area *area) struct route_node *rn; struct ospf_lsa *lsa; + ospf_opaque_type10_lsa_term(area); + /* Free LSDBs. */ LSDB_LOOP(ROUTER_LSDB(area), rn, lsa) ospf_discard_from_db(area->ospf, area->lsdb, lsa); |
