aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/gnunet-service-core_neighbours.c6
1 files changed, 4 insertions, 2 deletions
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)
502{ 502{
503 struct Neighbour *n = value; 503 struct Neighbour *n = value;
504 504
505 /* transport should have 'disconnected' all neighbours... */
506 GNUNET_break (0);
505 free_neighbour (n); 507 free_neighbour (n);
506 return GNUNET_OK; 508 return GNUNET_OK;
507} 509}
@@ -515,10 +517,10 @@ GSC_NEIGHBOURS_done ()
515{ 517{
516 if (NULL == transport) 518 if (NULL == transport)
517 return; 519 return;
518 GNUNET_CONTAINER_multihashmap_iterate (neighbours, &free_neighbour_helper,
519 NULL);
520 GNUNET_TRANSPORT_disconnect (transport); 520 GNUNET_TRANSPORT_disconnect (transport);
521 transport = NULL; 521 transport = NULL;
522 GNUNET_CONTAINER_multihashmap_iterate (neighbours, &free_neighbour_helper,
523 NULL);
522 GNUNET_CONTAINER_multihashmap_destroy (neighbours); 524 GNUNET_CONTAINER_multihashmap_destroy (neighbours);
523 neighbours = NULL; 525 neighbours = NULL;
524} 526}