- Fix crashing testcases
authorBart Polot <bart@net.in.tum.de>
Fri, 24 Feb 2012 12:15:57 +0000 (12:15 +0000)
committerBart Polot <bart@net.in.tum.de>
Fri, 24 Feb 2012 12:15:57 +0000 (12:15 +0000)
src/mesh/test_mesh_2dtorus.c
src/mesh/test_mesh_local_2.c

index 6d91185cc54fd6715245873f8e7ac2c4987d5e67..9946fe2d47be29b3cd5cd9c76ca3ca05a3fee49d 100644 (file)
@@ -114,6 +114,7 @@ shutdown_callback (void *cls, const char *emsg)
                 "test: All peers successfully shut down!\n");
   }
 #endif
+  GNUNET_CONFIGURATION_destroy (testing_cfg);
 }
 
 
@@ -125,7 +126,6 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 #endif
 
   GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
-  GNUNET_CONFIGURATION_destroy (testing_cfg);
 }
 
 
index c91548052d7c93108d692310bb11c9476349df2e..eff15046f5b84be13768f48262e299613a6d787e 100644 (file)
@@ -55,6 +55,10 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   {
     GNUNET_SCHEDULER_cancel (abort_task);
   }
+  if (NULL != t)
+  {
+    GNUNET_MESH_tunnel_destroy(t);
+  }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: D1\n");
   if (NULL != mesh_peer_1)
   {