From 4eb1c355d6cb8321f1f52fc74bb99e771719a371 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 10 Dec 2012 14:38:34 +0000 Subject: [PATCH] clean up --- .../gnunet-service-ats_addresses_simplistic.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/ats/gnunet-service-ats_addresses_simplistic.c b/src/ats/gnunet-service-ats_addresses_simplistic.c index 39b7cd107..94ee8ff84 100644 --- a/src/ats/gnunet-service-ats_addresses_simplistic.c +++ b/src/ats/gnunet-service-ats_addresses_simplistic.c @@ -145,7 +145,24 @@ void GAS_simplistic_done (void *solver) { struct GAS_SIMPLISTIC_Handle *s = solver; + struct AddressWrapper *cur; + struct AddressWrapper *next; + int c; GNUNET_assert (s != NULL); + + for (c = 0; c < s->networks; c++) + { + next = s->network_entries[c].head; + while (NULL != (cur = next)) + { + next = cur->next; + GNUNET_CONTAINER_DLL_remove (s->network_entries[c].head, + s->network_entries[c].tail, + cur); + GNUNET_free (cur); + + } + } GNUNET_free (s->network_entries); GNUNET_free (s); } -- 2.25.1