diff options
Diffstat (limited to 'src/testbed/testbed_api_hosts.c')
-rw-r--r-- | src/testbed/testbed_api_hosts.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c index 95463e44d..f7352250d 100644 --- a/src/testbed/testbed_api_hosts.c +++ b/src/testbed/testbed_api_hosts.c | |||
@@ -506,7 +506,7 @@ GNUNET_TESTBED_hosts_load_from_file ( | |||
506 | else | 506 | else |
507 | (void) GNUNET_TESTBED_host_create (hostname, username, cfg, port); | 507 | (void) GNUNET_TESTBED_host_create (hostname, username, cfg, port); |
508 | count++; | 508 | count++; |
509 | GNUNET_free_non_null (username); | 509 | GNUNET_free (username); |
510 | GNUNET_free (hostname); | 510 | GNUNET_free (hostname); |
511 | buf = &data[offset + 1]; | 511 | buf = &data[offset + 1]; |
512 | } | 512 | } |
@@ -611,26 +611,27 @@ GNUNET_TESTBED_hosts_load_from_loadleveler ( | |||
611 | void | 611 | void |
612 | GNUNET_TESTBED_host_destroy (struct GNUNET_TESTBED_Host *host) | 612 | GNUNET_TESTBED_host_destroy (struct GNUNET_TESTBED_Host *host) |
613 | { | 613 | { |
614 | struct RegisteredController *rc; | ||
615 | uint32_t id; | ||
616 | |||
617 | GNUNET_assert (host->id < host_list_size); | 614 | GNUNET_assert (host->id < host_list_size); |
618 | GNUNET_assert (host_list[host->id] == host); | 615 | GNUNET_assert (host_list[host->id] == host); |
619 | host_list[host->id] = NULL; | 616 | host_list[host->id] = NULL; |
620 | /* clear registered controllers list */ | 617 | /* clear registered controllers list */ |
621 | for (rc = host->rc_head; NULL != rc; rc = host->rc_head) | 618 | for (struct RegisteredController *rc = host->rc_head; |
619 | NULL != rc; | ||
620 | rc = host->rc_head) | ||
622 | { | 621 | { |
623 | GNUNET_CONTAINER_DLL_remove (host->rc_head, host->rc_tail, rc); | 622 | GNUNET_CONTAINER_DLL_remove (host->rc_head, host->rc_tail, rc); |
624 | GNUNET_free (rc); | 623 | GNUNET_free (rc); |
625 | } | 624 | } |
626 | GNUNET_free_non_null ((char *) host->username); | 625 | GNUNET_free_nz ((char *) host->username); |
627 | GNUNET_free_non_null ((char *) host->hostname); | 626 | GNUNET_free_nz ((char *) host->hostname); |
628 | GNUNET_TESTBED_operation_queue_destroy_ ( | 627 | GNUNET_TESTBED_operation_queue_destroy_ ( |
629 | host->opq_parallel_overlay_connect_operations); | 628 | host->opq_parallel_overlay_connect_operations); |
630 | GNUNET_CONFIGURATION_destroy (host->cfg); | 629 | GNUNET_CONFIGURATION_destroy (host->cfg); |
631 | GNUNET_free (host); | 630 | GNUNET_free (host); |
632 | while (host_list_size >= HOST_LIST_GROW_STEP) | 631 | while (host_list_size >= HOST_LIST_GROW_STEP) |
633 | { | 632 | { |
633 | uint32_t id; | ||
634 | |||
634 | for (id = host_list_size - 1; id > host_list_size - HOST_LIST_GROW_STEP; | 635 | for (id = host_list_size - 1; id > host_list_size - HOST_LIST_GROW_STEP; |
635 | id--) | 636 | id--) |
636 | if (NULL != host_list[id]) | 637 | if (NULL != host_list[id]) |
@@ -1223,7 +1224,7 @@ GNUNET_TESTBED_controller_destroy_ (struct GNUNET_TESTBED_ControllerProc *cproc) | |||
1223 | free_argv (cproc->helper_argv); | 1224 | free_argv (cproc->helper_argv); |
1224 | cproc->host->controller_started = GNUNET_NO; | 1225 | cproc->host->controller_started = GNUNET_NO; |
1225 | cproc->host->locked = GNUNET_NO; | 1226 | cproc->host->locked = GNUNET_NO; |
1226 | GNUNET_free_non_null (cproc->msg); | 1227 | GNUNET_free (cproc->msg); |
1227 | GNUNET_free (cproc); | 1228 | GNUNET_free (cproc); |
1228 | } | 1229 | } |
1229 | 1230 | ||