aboutsummaryrefslogtreecommitdiff
path: root/src/testing/gnunet-cmds-helper.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-12-08 17:52:42 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2022-12-08 17:52:42 +0900
commit1029772b39c7aab734c43df1188180764ff5c34b (patch)
treecdca60dca1e063a3c35c7e8a97e46e59909749dc /src/testing/gnunet-cmds-helper.c
parent5c4b060714954a6e4571fe981b333856d2ef4a1b (diff)
downloadgnunet-1029772b39c7aab734c43df1188180764ff5c34b.tar.gz
gnunet-1029772b39c7aab734c43df1188180764ff5c34b.zip
TESTING: Properly handle label allocations
Diffstat (limited to 'src/testing/gnunet-cmds-helper.c')
-rw-r--r--src/testing/gnunet-cmds-helper.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/testing/gnunet-cmds-helper.c b/src/testing/gnunet-cmds-helper.c
index 591ddd499..f87a055c3 100644
--- a/src/testing/gnunet-cmds-helper.c
+++ b/src/testing/gnunet-cmds-helper.c
@@ -385,15 +385,19 @@ tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message)
385 LOG (GNUNET_ERROR_TYPE_ERROR, 385 LOG (GNUNET_ERROR_TYPE_ERROR,
386 "subnet node n: %s\n", 386 "subnet node n: %s\n",
387 plugin->n); 387 plugin->n);
388 // FIXME: Free?
389 node_ip = GNUNET_malloc (strlen (NODE_BASE_IP) + strlen (plugin->m) + 1); 388 node_ip = GNUNET_malloc (strlen (NODE_BASE_IP) + strlen (plugin->m) + 1);
390 strcat (node_ip, NODE_BASE_IP); 389 strcat (node_ip, NODE_BASE_IP);
391 } 390 }
392 strcat (node_ip, plugin->m); 391 strcat (node_ip, plugin->m);
393 392
394 plugin->api->start_testcase (&write_message, router_ip, node_ip, plugin->m, 393 plugin->api->start_testcase (&write_message, router_ip, node_ip, plugin->m,
394
395 plugin->n, plugin->local_m, ni->topology_data, 395 plugin->n, plugin->local_m, ni->topology_data,
396 ni->read_file, &finished_cb); 396 ni->read_file, &finished_cb);
397 GNUNET_free (node_ip);
398 GNUNET_free (binary);
399 GNUNET_free (router_ip);
400 GNUNET_free (plugin_name);
397 401
398 msg_length = sizeof(struct GNUNET_TESTING_CommandHelperReply); 402 msg_length = sizeof(struct GNUNET_TESTING_CommandHelperReply);
399 reply = GNUNET_new (struct GNUNET_TESTING_CommandHelperReply); 403 reply = GNUNET_new (struct GNUNET_TESTING_CommandHelperReply);
@@ -402,10 +406,6 @@ tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message)
402 406
403 write_message ((struct GNUNET_MessageHeader *) reply, msg_length); 407 write_message ((struct GNUNET_MessageHeader *) reply, msg_length);
404 408
405 GNUNET_free (binary);
406 GNUNET_free (router_ip);
407 GNUNET_free (plugin_name);
408
409 return GNUNET_OK; 409 return GNUNET_OK;
410 } 410 }
411 else if (GNUNET_MESSAGE_TYPE_CMDS_HELPER_BARRIER_ADVANCED == ntohs ( 411 else if (GNUNET_MESSAGE_TYPE_CMDS_HELPER_BARRIER_ADVANCED == ntohs (