From: Christian Grothoff Date: Thu, 20 Oct 2011 11:19:04 +0000 (+0000) Subject: fix #1826 X-Git-Tag: initial-import-from-subversion-38251~16380 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f5d41b56a0c95429c82817e8e6bc8e45677fef76;p=oweals%2Fgnunet.git fix #1826 --- diff --git a/src/core/gnunet-service-core_neighbours.c b/src/core/gnunet-service-core_neighbours.c index 505b1797b..596836216 100644 --- a/src/core/gnunet-service-core_neighbours.c +++ b/src/core/gnunet-service-core_neighbours.c @@ -502,6 +502,8 @@ free_neighbour_helper (void *cls, const GNUNET_HashCode * key, void *value) { struct Neighbour *n = value; + /* transport should have 'disconnected' all neighbours... */ + GNUNET_break (0); free_neighbour (n); return GNUNET_OK; } @@ -515,10 +517,10 @@ GSC_NEIGHBOURS_done () { if (NULL == transport) return; - GNUNET_CONTAINER_multihashmap_iterate (neighbours, &free_neighbour_helper, - NULL); GNUNET_TRANSPORT_disconnect (transport); transport = NULL; + GNUNET_CONTAINER_multihashmap_iterate (neighbours, &free_neighbour_helper, + NULL); GNUNET_CONTAINER_multihashmap_destroy (neighbours); neighbours = NULL; }