aboutsummaryrefslogtreecommitdiff
path: root/src/testing/test_testing_group_remote.c
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-09-01 13:21:03 +0000
committerNathan S. Evans <evans@in.tum.de>2010-09-01 13:21:03 +0000
commit930871b49ea5ba14a92c6c0ed8e3ecc648da0b22 (patch)
tree280392bf53902b59073055c066fe1ebd69b43c7c /src/testing/test_testing_group_remote.c
parent05186db103486d199c2dc9357264a265e9c33117 (diff)
downloadgnunet-930871b49ea5ba14a92c6c0ed8e3ecc648da0b22.tar.gz
gnunet-930871b49ea5ba14a92c6c0ed8e3ecc648da0b22.zip
klocwork fixes
Diffstat (limited to 'src/testing/test_testing_group_remote.c')
-rw-r--r--src/testing/test_testing_group_remote.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testing/test_testing_group_remote.c b/src/testing/test_testing_group_remote.c
index b4d04fdd8..a58a1234e 100644
--- a/src/testing/test_testing_group_remote.c
+++ b/src/testing/test_testing_group_remote.c
@@ -106,6 +106,7 @@ run (void *cls,
106 const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) 106 const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
107{ 107{
108 struct GNUNET_TESTING_Host *hosts; 108 struct GNUNET_TESTING_Host *hosts;
109 struct GNUNET_TESTING_Host *hostpos;
109 struct GNUNET_TESTING_Host *temphost; 110 struct GNUNET_TESTING_Host *temphost;
110 char *hostfile; 111 char *hostfile;
111 struct stat frstat; 112 struct stat frstat;
@@ -123,12 +124,14 @@ run (void *cls,
123 &num_peers)) 124 &num_peers))
124 num_peers = DEFAULT_NUM_PEERS; 125 num_peers = DEFAULT_NUM_PEERS;
125 126
127 GNUNET_assert(num_peers > 0 && num_peers < (unsigned long long)-1);
126 if (GNUNET_OK != 128 if (GNUNET_OK !=
127 GNUNET_CONFIGURATION_get_value_string (cfg, "testing", "hostfile", 129 GNUNET_CONFIGURATION_get_value_string (cfg, "testing", "hostfile",
128 &hostfile)) 130 &hostfile))
129 hostfile = NULL; 131 hostfile = NULL;
130 132
131 hosts = NULL; 133 hosts = NULL;
134 data = NULL;
132 if (hostfile != NULL) 135 if (hostfile != NULL)
133 { 136 {
134 if (GNUNET_OK != GNUNET_DISK_file_test (hostfile)) 137 if (GNUNET_OK != GNUNET_DISK_file_test (hostfile))
@@ -188,6 +191,14 @@ run (void *cls,
188 NULL, 191 NULL,
189 NULL, 192 NULL,
190 hosts); 193 hosts);
194 hostpos = hosts;
195 while (hostpos != NULL)
196 {
197 temphost = hostpos->next;
198 GNUNET_free(hostpos);
199 hostpos = temphost;
200 }
201 GNUNET_free_non_null(data);
191 GNUNET_assert (pg != NULL); 202 GNUNET_assert (pg != NULL);
192} 203}
193 204