diff options
author | Bart Polot <bart@net.in.tum.de> | 2012-12-20 23:01:33 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2012-12-20 23:01:33 +0000 |
commit | 1277a7838c1b63f3752290a77284967044226dbb (patch) | |
tree | c44a3d0d84be94a2eef88caa1713cc60ddea7f10 /src/mesh | |
parent | cf95529fa04d327e049117b0230abb2bad4af351 (diff) | |
download | gnunet-1277a7838c1b63f3752290a77284967044226dbb.tar.gz gnunet-1277a7838c1b63f3752290a77284967044226dbb.zip |
- make sure GNUNET_TESTBED_operation_done is not called twice
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/mesh_test_lib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesh/mesh_test_lib.c b/src/mesh/mesh_test_lib.c index 760e74c9f..6b7439c18 100644 --- a/src/mesh/mesh_test_lib.c +++ b/src/mesh/mesh_test_lib.c | |||
@@ -202,7 +202,11 @@ GNUNET_MESH_TEST_cleanup (struct GNUNET_MESH_TEST_Context *ctx) | |||
202 | unsigned int i; | 202 | unsigned int i; |
203 | 203 | ||
204 | for (i = 0; i < ctx->num_peers; i++) | 204 | for (i = 0; i < ctx->num_peers; i++) |
205 | { | ||
206 | GNUNET_assert (NULL != ctx->ops[i]); | ||
205 | GNUNET_TESTBED_operation_done (ctx->ops[i]); | 207 | GNUNET_TESTBED_operation_done (ctx->ops[i]); |
208 | ctx->ops[i] = NULL; | ||
209 | } | ||
206 | GNUNET_free (ctx->ops); | 210 | GNUNET_free (ctx->ops); |
207 | GNUNET_free (ctx->meshes); | 211 | GNUNET_free (ctx->meshes); |
208 | GNUNET_free (ctx); | 212 | GNUNET_free (ctx); |
@@ -273,7 +277,7 @@ GNUNET_MESH_TEST_run (const char *testname, | |||
273 | const GNUNET_MESH_ApplicationType* stypes) | 277 | const GNUNET_MESH_ApplicationType* stypes) |
274 | { | 278 | { |
275 | struct GNUNET_MESH_TEST_Context *ctx; | 279 | struct GNUNET_MESH_TEST_Context *ctx; |
276 | 280 | ||
277 | ctx = GNUNET_malloc (sizeof (struct GNUNET_MESH_TEST_Context)); | 281 | ctx = GNUNET_malloc (sizeof (struct GNUNET_MESH_TEST_Context)); |
278 | ctx->num_peers = num_peers; | 282 | ctx->num_peers = num_peers; |
279 | ctx->ops = GNUNET_malloc (num_peers * sizeof (struct GNUNET_TESTBED_Operation *)); | 283 | ctx->ops = GNUNET_malloc (num_peers * sizeof (struct GNUNET_TESTBED_Operation *)); |