From 78bdb61823b4bc4939b1fc51d66e48638d9726b2 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Tue, 7 Feb 2012 15:59:51 +0000 Subject: [PATCH] - Fix cleanup on timeout --- src/mesh/test_mesh_small.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c index ab0f65755..1e0f2def2 100644 --- a/src/mesh/test_mesh_small.c +++ b/src/mesh/test_mesh_small.c @@ -233,6 +233,21 @@ disconnect_mesh_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: disconnecting mesh service of peers\n"); disconnect_task = GNUNET_SCHEDULER_NO_TASK; + if (NULL != t) + { + GNUNET_MESH_tunnel_destroy(t); + t = NULL; + } + if (NULL != incoming_t) + { + GNUNET_MESH_tunnel_destroy(incoming_t); + incoming_t = NULL; + } + if (NULL != incoming_t2) + { + GNUNET_MESH_tunnel_destroy(incoming_t2); + incoming_t2 = NULL; + } GNUNET_MESH_disconnect (h1); GNUNET_MESH_disconnect (h2); if (test == MULTICAST) -- 2.25.1