aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-09-23 15:01:51 +0000
committerBart Polot <bart@net.in.tum.de>2011-09-23 15:01:51 +0000
commita223c4213e71ecf5a69bbdd39ba46c021b85047c (patch)
tree7064278c3e0ee8686a5911ecc401f07ee2c3f835 /src/mesh
parentb7b9d0eb65ea53ac5aa35ed3ee7891f426d732bc (diff)
downloadgnunet-a223c4213e71ecf5a69bbdd39ba46c021b85047c.tar.gz
gnunet-a223c4213e71ecf5a69bbdd39ba46c021b85047c.zip
Fixed double destroy
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/gnunet-service-mesh.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 9af81333a..122280369 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -505,23 +505,6 @@ iterate_collect_neighbors (void *cls, const GNUNET_HashCode * key, void *value)
505} 505}
506 506
507 507
508/**
509 * Iterator over hash map peer entries and frees all data in it.
510 * Used prior to destroying a hashmap. Makes you miss anonymous functions in C.
511 *
512 * @param cls closure
513 * @param key current key code (will no longer contain valid data!!)
514 * @param value value in the hash map (treated as void *)
515 * @return GNUNET_YES if we should continue to iterate, GNUNET_NO if not.
516 */
517static int
518iterate_free (void *cls, const GNUNET_HashCode * key, void *value)
519{
520 GNUNET_free(value);
521 return GNUNET_YES;
522}
523
524
525/******************************************************************************/ 508/******************************************************************************/
526/************************ PERIODIC FUNCTIONS ****************************/ 509/************************ PERIODIC FUNCTIONS ****************************/
527/******************************************************************************/ 510/******************************************************************************/
@@ -1130,9 +1113,6 @@ tunnel_destroy (struct MeshTunnel *t)
1130 q = qn; 1113 q = qn;
1131 /* TODO cancel core transmit ready in case it was active */ 1114 /* TODO cancel core transmit ready in case it was active */
1132 } 1115 }
1133
1134 GNUNET_CONTAINER_multihashmap_iterate(t->tree->first_hops, &iterate_free, t);
1135 GNUNET_CONTAINER_multihashmap_destroy(t->tree->first_hops);
1136 tree_destroy(t->tree); 1116 tree_destroy(t->tree);
1137 GNUNET_free (t); 1117 GNUNET_free (t);
1138 return r; 1118 return r;