diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-08 17:52:42 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-08 17:52:42 +0900 |
commit | 1029772b39c7aab734c43df1188180764ff5c34b (patch) | |
tree | cdca60dca1e063a3c35c7e8a97e46e59909749dc /src | |
parent | 5c4b060714954a6e4571fe981b333856d2ef4a1b (diff) | |
download | gnunet-1029772b39c7aab734c43df1188180764ff5c34b.tar.gz gnunet-1029772b39c7aab734c43df1188180764ff5c34b.zip |
TESTING: Properly handle label allocations
Diffstat (limited to 'src')
23 files changed, 45 insertions, 37 deletions
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h index db89e1a8e..88910f65f 100644 --- a/src/include/gnunet_testing_ng_lib.h +++ b/src/include/gnunet_testing_ng_lib.h | |||
@@ -108,7 +108,7 @@ struct GNUNET_TESTING_Command | |||
108 | /** | 108 | /** |
109 | * Label for the command. | 109 | * Label for the command. |
110 | */ | 110 | */ |
111 | const char *label; | 111 | char *label; |
112 | 112 | ||
113 | /** | 113 | /** |
114 | * Runs the command. Note that upon return, the interpreter | 114 | * Runs the command. Note that upon return, the interpreter |
@@ -434,7 +434,7 @@ GNUNET_TESTING_get_barrier (struct GNUNET_TESTING_Interpreter *is, | |||
434 | * | 434 | * |
435 | * @param is The interpreter. | 435 | * @param is The interpreter. |
436 | * @param barrier The barrier to add. | 436 | * @param barrier The barrier to add. |
437 | */ | 437 | */ |
438 | void | 438 | void |
439 | GNUNET_TESTING_barrier_add (struct GNUNET_TESTING_Interpreter *is, | 439 | GNUNET_TESTING_barrier_add (struct GNUNET_TESTING_Interpreter *is, |
440 | struct GNUNET_TESTING_Barrier *barrier); | 440 | struct GNUNET_TESTING_Barrier *barrier); |
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 ( |
diff --git a/src/testing/testing_api_cmd_barrier.c b/src/testing/testing_api_cmd_barrier.c index b0293f2c7..ad75f8297 100644 --- a/src/testing/testing_api_cmd_barrier.c +++ b/src/testing/testing_api_cmd_barrier.c | |||
@@ -245,7 +245,7 @@ GNUNET_TESTING_cmd_barrier_create (const char *label, | |||
245 | { | 245 | { |
246 | struct GNUNET_TESTING_Command cmd = { | 246 | struct GNUNET_TESTING_Command cmd = { |
247 | .cls = bs, | 247 | .cls = bs, |
248 | .label = label, | 248 | .label = GNUNET_strdup (label), |
249 | .run = &barrier_run, | 249 | .run = &barrier_run, |
250 | .cleanup = &barrier_cleanup, | 250 | .cleanup = &barrier_cleanup, |
251 | .traits = &barrier_traits | 251 | .traits = &barrier_traits |
diff --git a/src/testing/testing_api_cmd_barrier_reached.c b/src/testing/testing_api_cmd_barrier_reached.c index 7e6f58fc1..43bf86398 100644 --- a/src/testing/testing_api_cmd_barrier_reached.c +++ b/src/testing/testing_api_cmd_barrier_reached.c | |||
@@ -202,7 +202,7 @@ GNUNET_TESTING_cmd_barrier_reached ( | |||
202 | { | 202 | { |
203 | struct GNUNET_TESTING_Command cmd = { | 203 | struct GNUNET_TESTING_Command cmd = { |
204 | .cls = brs, | 204 | .cls = brs, |
205 | .label = label, | 205 | .label = GNUNET_strdup (label), |
206 | .run = &barrier_reached_run, | 206 | .run = &barrier_reached_run, |
207 | .ac = &brs->ac, | 207 | .ac = &brs->ac, |
208 | .cleanup = &barrier_reached_cleanup, | 208 | .cleanup = &barrier_reached_cleanup, |
diff --git a/src/testing/testing_api_cmd_batch.c b/src/testing/testing_api_cmd_batch.c index 080a4880d..e7ecbf28d 100644 --- a/src/testing/testing_api_cmd_batch.c +++ b/src/testing/testing_api_cmd_batch.c | |||
@@ -173,7 +173,7 @@ GNUNET_TESTING_cmd_batch (const char *label, | |||
173 | { | 173 | { |
174 | struct GNUNET_TESTING_Command cmd = { | 174 | struct GNUNET_TESTING_Command cmd = { |
175 | .cls = bs, | 175 | .cls = bs, |
176 | .label = label, | 176 | .label = GNUNET_strdup (label), |
177 | .run = &batch_run, | 177 | .run = &batch_run, |
178 | .cleanup = &batch_cleanup, | 178 | .cleanup = &batch_cleanup, |
179 | .traits = &batch_traits | 179 | .traits = &batch_traits |
diff --git a/src/testing/testing_api_cmd_block_until_external_trigger.c b/src/testing/testing_api_cmd_block_until_external_trigger.c index 347791b7a..b4f088077 100644 --- a/src/testing/testing_api_cmd_block_until_external_trigger.c +++ b/src/testing/testing_api_cmd_block_until_external_trigger.c | |||
@@ -111,7 +111,7 @@ GNUNET_TESTING_cmd_block_until_external_trigger ( | |||
111 | { | 111 | { |
112 | struct GNUNET_TESTING_Command cmd = { | 112 | struct GNUNET_TESTING_Command cmd = { |
113 | .cls = bs, | 113 | .cls = bs, |
114 | .label = label, | 114 | .label = GNUNET_strdup (label), |
115 | .run = &block_until_all_peers_started_run, | 115 | .run = &block_until_all_peers_started_run, |
116 | .ac = &bs->ac, | 116 | .ac = &bs->ac, |
117 | .cleanup = &block_until_all_peers_started_cleanup, | 117 | .cleanup = &block_until_all_peers_started_cleanup, |
diff --git a/src/testing/testing_api_cmd_finish.c b/src/testing/testing_api_cmd_finish.c index 47199d3d6..cad5edc67 100644 --- a/src/testing/testing_api_cmd_finish.c +++ b/src/testing/testing_api_cmd_finish.c | |||
@@ -178,7 +178,7 @@ GNUNET_TESTING_cmd_finish (const char *finish_label, | |||
178 | { | 178 | { |
179 | struct GNUNET_TESTING_Command cmd = { | 179 | struct GNUNET_TESTING_Command cmd = { |
180 | .cls = finish_state, | 180 | .cls = finish_state, |
181 | .label = finish_label, | 181 | .label = GNUNET_strdup (finish_label), |
182 | .run = &run_finish, | 182 | .run = &run_finish, |
183 | .ac = &finish_state->ac, | 183 | .ac = &finish_state->ac, |
184 | .cleanup = &cleanup_finish | 184 | .cleanup = &cleanup_finish |
diff --git a/src/testing/testing_api_cmd_local_test_finished.c b/src/testing/testing_api_cmd_local_test_finished.c index 709c6b62f..7eca7e0d3 100644 --- a/src/testing/testing_api_cmd_local_test_finished.c +++ b/src/testing/testing_api_cmd_local_test_finished.c | |||
@@ -110,7 +110,7 @@ GNUNET_TESTING_cmd_local_test_finished ( | |||
110 | { | 110 | { |
111 | struct GNUNET_TESTING_Command cmd = { | 111 | struct GNUNET_TESTING_Command cmd = { |
112 | .cls = lfs, | 112 | .cls = lfs, |
113 | .label = label, | 113 | .label = GNUNET_strdup (label), |
114 | .run = &local_test_finished_run, | 114 | .run = &local_test_finished_run, |
115 | .cleanup = &local_test_finished_cleanup, | 115 | .cleanup = &local_test_finished_cleanup, |
116 | }; | 116 | }; |
diff --git a/src/testing/testing_api_cmd_local_test_prepared.c b/src/testing/testing_api_cmd_local_test_prepared.c index 0b88586e8..a4082f0e3 100644 --- a/src/testing/testing_api_cmd_local_test_prepared.c +++ b/src/testing/testing_api_cmd_local_test_prepared.c | |||
@@ -104,7 +104,7 @@ GNUNET_TESTING_cmd_local_test_prepared (const char *label, | |||
104 | 104 | ||
105 | struct GNUNET_TESTING_Command cmd = { | 105 | struct GNUNET_TESTING_Command cmd = { |
106 | .cls = lfs, | 106 | .cls = lfs, |
107 | .label = label, | 107 | .label = GNUNET_strdup (label), |
108 | .run = &local_test_prepared_run, | 108 | .run = &local_test_prepared_run, |
109 | .ac = &lfs->ac, | 109 | .ac = &lfs->ac, |
110 | .cleanup = &local_test_prepared_cleanup, | 110 | .cleanup = &local_test_prepared_cleanup, |
diff --git a/src/testing/testing_api_cmd_netjail_start.c b/src/testing/testing_api_cmd_netjail_start.c index 6cd648c3a..8b239275b 100644 --- a/src/testing/testing_api_cmd_netjail_start.c +++ b/src/testing/testing_api_cmd_netjail_start.c | |||
@@ -225,7 +225,7 @@ GNUNET_TESTING_cmd_netjail_start (const char *label, | |||
225 | { | 225 | { |
226 | struct GNUNET_TESTING_Command cmd = { | 226 | struct GNUNET_TESTING_Command cmd = { |
227 | .cls = ns, | 227 | .cls = ns, |
228 | .label = label, | 228 | .label = GNUNET_strdup (label), |
229 | .run = &netjail_start_run, | 229 | .run = &netjail_start_run, |
230 | .ac = &ns->ac, | 230 | .ac = &ns->ac, |
231 | .cleanup = &netjail_start_cleanup | 231 | .cleanup = &netjail_start_cleanup |
diff --git a/src/testing/testing_api_cmd_netjail_start_testsystem.c b/src/testing/testing_api_cmd_netjail_start_testsystem.c index 4b2fbcc56..d33284b78 100644 --- a/src/testing/testing_api_cmd_netjail_start_testsystem.c +++ b/src/testing/testing_api_cmd_netjail_start_testsystem.c | |||
@@ -827,7 +827,7 @@ GNUNET_TESTING_cmd_netjail_start_testing_system ( | |||
827 | 827 | ||
828 | struct GNUNET_TESTING_Command cmd = { | 828 | struct GNUNET_TESTING_Command cmd = { |
829 | .cls = ns, | 829 | .cls = ns, |
830 | .label = label, | 830 | .label = GNUNET_strdup (label), |
831 | .run = &netjail_exec_run, | 831 | .run = &netjail_exec_run, |
832 | .ac = &ns->ac, | 832 | .ac = &ns->ac, |
833 | .cleanup = &netjail_exec_cleanup, | 833 | .cleanup = &netjail_exec_cleanup, |
diff --git a/src/testing/testing_api_cmd_netjail_stop.c b/src/testing/testing_api_cmd_netjail_stop.c index f1b2260ab..05435f63c 100644 --- a/src/testing/testing_api_cmd_netjail_stop.c +++ b/src/testing/testing_api_cmd_netjail_stop.c | |||
@@ -192,7 +192,7 @@ GNUNET_TESTING_cmd_netjail_stop (const char *label, | |||
192 | { | 192 | { |
193 | struct GNUNET_TESTING_Command cmd = { | 193 | struct GNUNET_TESTING_Command cmd = { |
194 | .cls = ns, | 194 | .cls = ns, |
195 | .label = label, | 195 | .label = GNUNET_strdup (label), |
196 | .run = &netjail_stop_run, | 196 | .run = &netjail_stop_run, |
197 | .ac = &ns->ac, | 197 | .ac = &ns->ac, |
198 | .cleanup = &netjail_stop_cleanup | 198 | .cleanup = &netjail_stop_cleanup |
diff --git a/src/testing/testing_api_cmd_netjail_stop_testsystem.c b/src/testing/testing_api_cmd_netjail_stop_testsystem.c index 2e42056dc..69455c909 100644 --- a/src/testing/testing_api_cmd_netjail_stop_testsystem.c +++ b/src/testing/testing_api_cmd_netjail_stop_testsystem.c | |||
@@ -149,7 +149,7 @@ GNUNET_TESTING_cmd_stop_testing_system ( | |||
149 | 149 | ||
150 | struct GNUNET_TESTING_Command cmd = { | 150 | struct GNUNET_TESTING_Command cmd = { |
151 | .cls = shs, | 151 | .cls = shs, |
152 | .label = label, | 152 | .label = GNUNET_strdup (label), |
153 | .run = &stop_testing_system_run, | 153 | .run = &stop_testing_system_run, |
154 | .cleanup = &stop_testing_system_cleanup, | 154 | .cleanup = &stop_testing_system_cleanup, |
155 | }; | 155 | }; |
diff --git a/src/testing/testing_api_cmd_send_peer_ready.c b/src/testing/testing_api_cmd_send_peer_ready.c index 1a2607047..f277b8dbd 100644 --- a/src/testing/testing_api_cmd_send_peer_ready.c +++ b/src/testing/testing_api_cmd_send_peer_ready.c | |||
@@ -116,7 +116,7 @@ GNUNET_TESTING_cmd_send_peer_ready (const char *label, | |||
116 | { | 116 | { |
117 | struct GNUNET_TESTING_Command cmd = { | 117 | struct GNUNET_TESTING_Command cmd = { |
118 | .cls = sprs, | 118 | .cls = sprs, |
119 | .label = label, | 119 | .label = GNUNET_strdup (label), |
120 | .run = &send_peer_ready_run, | 120 | .run = &send_peer_ready_run, |
121 | .cleanup = &send_peer_ready_cleanup, | 121 | .cleanup = &send_peer_ready_cleanup, |
122 | .traits = &send_peer_ready_traits | 122 | .traits = &send_peer_ready_traits |
diff --git a/src/testing/testing_api_cmd_system_create.c b/src/testing/testing_api_cmd_system_create.c index 221bbb8f6..4199eccd6 100644 --- a/src/testing/testing_api_cmd_system_create.c +++ b/src/testing/testing_api_cmd_system_create.c | |||
@@ -119,7 +119,7 @@ GNUNET_TESTING_cmd_system_create (const char *label, | |||
119 | 119 | ||
120 | struct GNUNET_TESTING_Command cmd = { | 120 | struct GNUNET_TESTING_Command cmd = { |
121 | .cls = tss, | 121 | .cls = tss, |
122 | .label = label, | 122 | .label = GNUNET_strdup (label), |
123 | .run = &system_create_run, | 123 | .run = &system_create_run, |
124 | .cleanup = &system_create_cleanup, | 124 | .cleanup = &system_create_cleanup, |
125 | .traits = &system_create_traits | 125 | .traits = &system_create_traits |
diff --git a/src/testing/testing_api_cmd_system_destroy.c b/src/testing/testing_api_cmd_system_destroy.c index 5a2440766..ebb975fc3 100644 --- a/src/testing/testing_api_cmd_system_destroy.c +++ b/src/testing/testing_api_cmd_system_destroy.c | |||
@@ -107,7 +107,7 @@ GNUNET_TESTING_cmd_system_destroy (const char *label, | |||
107 | { | 107 | { |
108 | struct GNUNET_TESTING_Command cmd = { | 108 | struct GNUNET_TESTING_Command cmd = { |
109 | .cls = tss, | 109 | .cls = tss, |
110 | .label = label, | 110 | .label = GNUNET_strdup (label), |
111 | .run = &system_destroy_run, | 111 | .run = &system_destroy_run, |
112 | .cleanup = &system_destroy_cleanup, | 112 | .cleanup = &system_destroy_cleanup, |
113 | .traits = &system_destroy_traits | 113 | .traits = &system_destroy_traits |
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c index 420e1cfcc..01af7da2a 100644 --- a/src/testing/testing_api_loop.c +++ b/src/testing/testing_api_loop.c | |||
@@ -41,7 +41,7 @@ struct GNUNET_TESTING_Interpreter | |||
41 | * Send handle for sending messages to netjail nodes. | 41 | * Send handle for sending messages to netjail nodes. |
42 | */ | 42 | */ |
43 | struct GNUNET_HELPER_SendHandle *sh; | 43 | struct GNUNET_HELPER_SendHandle *sh; |
44 | 44 | ||
45 | /** | 45 | /** |
46 | * Array with handles of helper processes for communication with netjails. | 46 | * Array with handles of helper processes for communication with netjails. |
47 | */ | 47 | */ |
@@ -271,6 +271,7 @@ finish_test (void *cls) | |||
271 | "Cleaning up cmd %s\n", | 271 | "Cleaning up cmd %s\n", |
272 | cmd->label); | 272 | cmd->label); |
273 | cmd->cleanup (cmd->cls); | 273 | cmd->cleanup (cmd->cls); |
274 | GNUNET_free (cmd->label); | ||
274 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 275 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
275 | "Cleaned up cmd %s\n", | 276 | "Cleaned up cmd %s\n", |
276 | cmd->label); | 277 | cmd->label); |
diff --git a/src/transport/test_transport_plugin_cmd_udp_backchannel.c b/src/transport/test_transport_plugin_cmd_udp_backchannel.c index 81445b25e..1bc965848 100644 --- a/src/transport/test_transport_plugin_cmd_udp_backchannel.c +++ b/src/transport/test_transport_plugin_cmd_udp_backchannel.c | |||
@@ -90,7 +90,7 @@ get_waiting_for_barriers () | |||
90 | { | 90 | { |
91 | struct GNUNET_TESTING_Barrier *barrier; | 91 | struct GNUNET_TESTING_Barrier *barrier; |
92 | 92 | ||
93 | //No Barrier | 93 | // No Barrier |
94 | return NULL; | 94 | return NULL; |
95 | } | 95 | } |
96 | 96 | ||
@@ -98,7 +98,8 @@ get_waiting_for_barriers () | |||
98 | static void | 98 | static void |
99 | barrier_advanced (const char *barrier_name) | 99 | barrier_advanced (const char *barrier_name) |
100 | { | 100 | { |
101 | struct GNUNET_TESTING_Barrier *barrier = GNUNET_TESTING_get_barrier (is, barrier_name); | 101 | struct GNUNET_TESTING_Barrier *barrier = GNUNET_TESTING_get_barrier (is, |
102 | barrier_name); | ||
102 | 103 | ||
103 | GNUNET_TESTING_finish_attached_cmds (is, barrier); | 104 | GNUNET_TESTING_finish_attached_cmds (is, barrier); |
104 | } | 105 | } |
@@ -329,9 +330,9 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, | |||
329 | ts->write_message = write_message; | 330 | ts->write_message = write_message; |
330 | 331 | ||
331 | is = GNUNET_TESTING_run (commands, | 332 | is = GNUNET_TESTING_run (commands, |
332 | TIMEOUT, | 333 | TIMEOUT, |
333 | &handle_result, | 334 | &handle_result, |
334 | ts); | 335 | ts); |
335 | 336 | ||
336 | } | 337 | } |
337 | 338 | ||
diff --git a/src/transport/transport-testing-cmds.h b/src/transport/transport-testing-cmds.h index 680162563..26933a575 100644 --- a/src/transport/transport-testing-cmds.h +++ b/src/transport/transport-testing-cmds.h | |||
@@ -109,20 +109,22 @@ struct StartPeerState | |||
109 | /** | 109 | /** |
110 | * The ip of a node. | 110 | * The ip of a node. |
111 | */ | 111 | */ |
112 | const char *node_ip; | 112 | char *node_ip; |
113 | 113 | ||
114 | /** | 114 | /** |
115 | * Receive callback | 115 | * Receive callback |
116 | */ | 116 | */ |
117 | struct GNUNET_MQ_MessageHandler *handlers; | 117 | struct GNUNET_MQ_MessageHandler *handlers; |
118 | 118 | ||
119 | const char *cfgname; | 119 | //FIXME documentation |
120 | char *cfgname; | ||
120 | 121 | ||
121 | /** | 122 | /** |
122 | * Peer's configuration | 123 | * Peer's configuration |
123 | */ | 124 | */ |
124 | struct GNUNET_CONFIGURATION_Handle *cfg; | 125 | struct GNUNET_CONFIGURATION_Handle *cfg; |
125 | 126 | ||
127 | //FIXME documentation | ||
126 | struct GNUNET_TESTING_Peer *peer; | 128 | struct GNUNET_TESTING_Peer *peer; |
127 | 129 | ||
128 | /** | 130 | /** |
@@ -165,13 +167,14 @@ struct StartPeerState | |||
165 | */ | 167 | */ |
166 | size_t hello_size; | 168 | size_t hello_size; |
167 | 169 | ||
170 | /** All of the below: FIXME documentation */ | ||
168 | char *m; | 171 | char *m; |
169 | 172 | ||
170 | char *n; | 173 | char *n; |
171 | 174 | ||
172 | char *local_m; | 175 | char *local_m; |
173 | 176 | ||
174 | const char *system_label; | 177 | char *system_label; |
175 | 178 | ||
176 | /** | 179 | /** |
177 | * An unique number to identify the peer | 180 | * An unique number to identify the peer |
diff --git a/src/transport/transport_api_cmd_backchannel_check.c b/src/transport/transport_api_cmd_backchannel_check.c index 0376275a3..e67d9a79c 100644 --- a/src/transport/transport_api_cmd_backchannel_check.c +++ b/src/transport/transport_api_cmd_backchannel_check.c | |||
@@ -547,7 +547,7 @@ GNUNET_TRANSPORT_cmd_backchannel_check (const char *label, | |||
547 | 547 | ||
548 | struct GNUNET_TESTING_Command cmd = { | 548 | struct GNUNET_TESTING_Command cmd = { |
549 | .cls = cs, | 549 | .cls = cs, |
550 | .label = label, | 550 | .label = GNUNET_strdup (label), |
551 | .run = &backchannel_check_run, | 551 | .run = &backchannel_check_run, |
552 | .ac = &cs->ac, | 552 | .ac = &cs->ac, |
553 | .cleanup = &backchannel_check_cleanup, | 553 | .cleanup = &backchannel_check_cleanup, |
diff --git a/src/transport/transport_api_cmd_connecting_peers.c b/src/transport/transport_api_cmd_connecting_peers.c index a6006f698..d610bbcb7 100644 --- a/src/transport/transport_api_cmd_connecting_peers.c +++ b/src/transport/transport_api_cmd_connecting_peers.c | |||
@@ -254,7 +254,7 @@ GNUNET_TRANSPORT_cmd_connect_peers (const char *label, | |||
254 | { | 254 | { |
255 | struct GNUNET_TESTING_Command cmd = { | 255 | struct GNUNET_TESTING_Command cmd = { |
256 | .cls = cps, | 256 | .cls = cps, |
257 | .label = label, | 257 | .label = GNUNET_strdup (label), |
258 | .run = &connect_peers_run, | 258 | .run = &connect_peers_run, |
259 | .ac = &cps->ac, | 259 | .ac = &cps->ac, |
260 | .cleanup = &connect_peers_cleanup, | 260 | .cleanup = &connect_peers_cleanup, |
diff --git a/src/transport/transport_api_cmd_start_peer.c b/src/transport/transport_api_cmd_start_peer.c index 5dfb820e0..7de1d842e 100644 --- a/src/transport/transport_api_cmd_start_peer.c +++ b/src/transport/transport_api_cmd_start_peer.c | |||
@@ -386,6 +386,9 @@ start_peer_cleanup (void *cls) | |||
386 | GNUNET_CONFIGURATION_destroy (sps->cfg); | 386 | GNUNET_CONFIGURATION_destroy (sps->cfg); |
387 | sps->cfg = NULL; | 387 | sps->cfg = NULL; |
388 | } | 388 | } |
389 | GNUNET_free (sps->cfgname); | ||
390 | GNUNET_free (sps->node_ip); | ||
391 | GNUNET_free (sps->system_label); | ||
389 | GNUNET_free (sps->hello); | 392 | GNUNET_free (sps->hello); |
390 | GNUNET_free (sps->connected_peers_map); | 393 | GNUNET_free (sps->connected_peers_map); |
391 | GNUNET_free (sps); | 394 | GNUNET_free (sps); |
@@ -449,10 +452,10 @@ GNUNET_TRANSPORT_cmd_start_peer (const char *label, | |||
449 | 452 | ||
450 | sps = GNUNET_new (struct StartPeerState); | 453 | sps = GNUNET_new (struct StartPeerState); |
451 | sps->no = no; | 454 | sps->no = no; |
452 | sps->system_label = system_label; | 455 | sps->system_label = GNUNET_strdup (system_label); |
453 | sps->connected_peers_map = connected_peers_map; | 456 | sps->connected_peers_map = connected_peers_map; |
454 | sps->cfgname = cfgname; | 457 | sps->cfgname = GNUNET_strdup (cfgname); |
455 | sps->node_ip = node_ip; | 458 | sps->node_ip = GNUNET_strdup (node_ip); |
456 | sps->notify_connect = notify_connect; | 459 | sps->notify_connect = notify_connect; |
457 | sps->broadcast = broadcast; | 460 | sps->broadcast = broadcast; |
458 | 461 | ||
@@ -469,7 +472,7 @@ GNUNET_TRANSPORT_cmd_start_peer (const char *label, | |||
469 | 472 | ||
470 | struct GNUNET_TESTING_Command cmd = { | 473 | struct GNUNET_TESTING_Command cmd = { |
471 | .cls = sps, | 474 | .cls = sps, |
472 | .label = label, | 475 | .label = GNUNET_strdup (label), |
473 | .run = &start_peer_run, | 476 | .run = &start_peer_run, |
474 | .ac = &sps->ac, | 477 | .ac = &sps->ac, |
475 | .cleanup = &start_peer_cleanup, | 478 | .cleanup = &start_peer_cleanup, |
diff --git a/src/transport/transport_api_cmd_stop_peer.c b/src/transport/transport_api_cmd_stop_peer.c index 4ca730add..04c822155 100644 --- a/src/transport/transport_api_cmd_stop_peer.c +++ b/src/transport/transport_api_cmd_stop_peer.c | |||
@@ -146,7 +146,7 @@ GNUNET_TRANSPORT_cmd_stop_peer (const char *label, | |||
146 | { | 146 | { |
147 | struct GNUNET_TESTING_Command cmd = { | 147 | struct GNUNET_TESTING_Command cmd = { |
148 | .cls = sps, | 148 | .cls = sps, |
149 | .label = label, | 149 | .label = GNUNET_strdup (label), |
150 | .run = &stop_peer_run, | 150 | .run = &stop_peer_run, |
151 | .cleanup = &stop_peer_cleanup, | 151 | .cleanup = &stop_peer_cleanup, |
152 | .traits = &stop_peer_traits | 152 | .traits = &stop_peer_traits |