aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_hosts.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2012-08-17 12:32:44 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2012-08-17 12:32:44 +0000
commitd6f2d6cd9b3a14e9dc7cea1e5d1863d6d59af0af (patch)
tree07f12cb35c32734f25a3a0e4317ee0559168b2d7 /src/testbed/testbed_api_hosts.c
parent7cd1ffc72cf73bdce3cc9d6f2ccdd3cd641d8f76 (diff)
downloadgnunet-d6f2d6cd9b3a14e9dc7cea1e5d1863d6d59af0af.tar.gz
gnunet-d6f2d6cd9b3a14e9dc7cea1e5d1863d6d59af0af.zip
fixes
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 {