summaryrefslogtreecommitdiff
path: root/src/mesh/mesh_test_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/mesh_test_lib.c')
-rw-r--r--src/mesh/mesh_test_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesh/mesh_test_lib.c b/src/mesh/mesh_test_lib.c
index 7ad888da8..0229a5bb1 100644
--- a/src/mesh/mesh_test_lib.c
+++ b/src/mesh/mesh_test_lib.c
@@ -237,7 +237,7 @@ mesh_test_run (void *cls,
for (i = 0; i < num_peers; i++)
{
struct GNUNET_MESH_TEST_AdapterContext *newctx;
- newctx = GNUNET_malloc (sizeof (struct GNUNET_MESH_TEST_AdapterContext));
+ newctx = GNUNET_new (struct GNUNET_MESH_TEST_AdapterContext);
newctx->peer = i;
newctx->ctx = ctx;
ctx->ops[i] = GNUNET_TESTBED_service_connect (ctx,
@@ -265,7 +265,7 @@ GNUNET_MESH_TEST_run (const char *testname,
{
struct GNUNET_MESH_TEST_Context *ctx;
- ctx = GNUNET_malloc (sizeof (struct GNUNET_MESH_TEST_Context));
+ ctx = GNUNET_new (struct GNUNET_MESH_TEST_Context);
ctx->num_peers = num_peers;
ctx->ops = GNUNET_malloc (num_peers * sizeof (struct GNUNET_TESTBED_Operation *));
ctx->meshes = GNUNET_malloc (num_peers * sizeof (struct GNUNET_MESH_Handle *));