aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_hosts.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testbed/testbed_api_hosts.c')
-rw-r--r--src/testbed/testbed_api_hosts.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c
index 817abd8e9..27731caf8 100644
--- a/src/testbed/testbed_api_hosts.c
+++ b/src/testbed/testbed_api_hosts.c
@@ -242,8 +242,8 @@ GNUNET_TESTBED_host_create_with_id (uint32_t id,
242 return NULL; 242 return NULL;
243 } 243 }
244 host = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_Host)); 244 host = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_Host));
245 host->hostname = hostname; 245 host->hostname = (NULL != hostname) ? GNUNET_strdup (hostname) : NULL;
246 host->username = username; 246 host->username = (NULL != username) ? GNUNET_strdup (username) : NULL;
247 host->id = id; 247 host->id = id;
248 host->port = (0 == port) ? 22 : port; 248 host->port = (0 == port) ? 22 : port;
249 new_size = host_list_size; 249 new_size = host_list_size;
@@ -326,6 +326,8 @@ GNUNET_TESTBED_host_destroy (struct GNUNET_TESTBED_Host *host)
326 GNUNET_CONTAINER_DLL_remove (host->rc_head, host->rc_tail, rc); 326 GNUNET_CONTAINER_DLL_remove (host->rc_head, host->rc_tail, rc);
327 GNUNET_free (rc); 327 GNUNET_free (rc);
328 } 328 }
329 GNUNET_free_non_null ((char *) host->username);
330 GNUNET_free_non_null ((char *) host->hostname);
329 GNUNET_free (host); 331 GNUNET_free (host);
330 while (host_list_size >= HOST_LIST_GROW_STEP) 332 while (host_list_size >= HOST_LIST_GROW_STEP)
331 { 333 {