diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-20 11:19:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-20 11:19:04 +0000 |
commit | f5d41b56a0c95429c82817e8e6bc8e45677fef76 (patch) | |
tree | 1c2134ba2ec060a4072598b8b37f6a32bff629a2 /src/core | |
parent | f2f71436144fa4f7df844293312eb7888eeea8f7 (diff) | |
download | gnunet-f5d41b56a0c95429c82817e8e6bc8e45677fef76.tar.gz gnunet-f5d41b56a0c95429c82817e8e6bc8e45677fef76.zip |
fix #1826
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/gnunet-service-core_neighbours.c | 6 |
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 | } |