aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/gnunet-service-mesh.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/gnunet-service-mesh.c')
-rw-r--r--src/mesh/gnunet-service-mesh.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index f39040851..77986f90c 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -1084,28 +1084,6 @@ tunnel_notify_connection_broken (struct MeshTunnel *t,
1084 1084
1085 1085
1086/** 1086/**
1087 * Recursively destory the path tree of a tunnel.
1088 * Note: it does not liberate memory for itself, parent must do it!
1089 *
1090 * @param n The node to destroy, along with children.
1091 *
1092 * @return GNUNET_OK on success
1093 */
1094static void
1095tunnel_destroy_tree_node (struct MeshTunnelTreeNode *n)
1096{
1097 unsigned int i;
1098
1099 for (i = 0; i < n->nchildren; i++)
1100 {
1101 tunnel_destroy_tree_node(&n->children[i]);
1102 }
1103 if (NULL != n->children)
1104 GNUNET_free (n->children);
1105}
1106
1107
1108/**
1109 * Destroy the tunnel and free any allocated resources linked to it 1087 * Destroy the tunnel and free any allocated resources linked to it
1110 * 1088 *
1111 * @param t the tunnel to destroy 1089 * @param t the tunnel to destroy
@@ -1155,9 +1133,7 @@ tunnel_destroy (struct MeshTunnel *t)
1155 1133
1156 GNUNET_CONTAINER_multihashmap_iterate(t->tree->first_hops, &iterate_free, t); 1134 GNUNET_CONTAINER_multihashmap_iterate(t->tree->first_hops, &iterate_free, t);
1157 GNUNET_CONTAINER_multihashmap_destroy(t->tree->first_hops); 1135 GNUNET_CONTAINER_multihashmap_destroy(t->tree->first_hops);
1158 tunnel_destroy_tree_node(t->tree->root); 1136 tree_destroy(t->tree);
1159 GNUNET_free(t->tree->root);
1160 GNUNET_free (t->tree);
1161 GNUNET_free (t); 1137 GNUNET_free (t);
1162 return r; 1138 return r;
1163} 1139}