From 1277a7838c1b63f3752290a77284967044226dbb Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 20 Dec 2012 23:01:33 +0000 Subject: - make sure GNUNET_TESTBED_operation_done is not called twice --- src/mesh/mesh_test_lib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesh') 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) unsigned int i; for (i = 0; i < ctx->num_peers; i++) + { + GNUNET_assert (NULL != ctx->ops[i]); GNUNET_TESTBED_operation_done (ctx->ops[i]); + ctx->ops[i] = NULL; + } GNUNET_free (ctx->ops); GNUNET_free (ctx->meshes); GNUNET_free (ctx); @@ -273,7 +277,7 @@ GNUNET_MESH_TEST_run (const char *testname, const GNUNET_MESH_ApplicationType* stypes) { struct GNUNET_MESH_TEST_Context *ctx; - + ctx = GNUNET_malloc (sizeof (struct GNUNET_MESH_TEST_Context)); ctx->num_peers = num_peers; ctx->ops = GNUNET_malloc (num_peers * sizeof (struct GNUNET_TESTBED_Operation *)); -- cgit v1.2.3