fixes
[oweals/gnunet.git] / src / testbed / test_testbed_api_hosts.c
index e98bc8e21591570ab18c0d9ca8d4835185df7220..12f0b61c742b9754d94e0c112ecb20dd57114cc0 100644 (file)
@@ -73,6 +73,7 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_TESTBED_host_destroy (hosts[num_hosts - 1]);
     num_hosts--;
   }
+  GNUNET_free (hosts);
 }
 
 
@@ -99,8 +100,9 @@ run (void *cls, char *const *args, const char *cfgfile,
   hosts = NULL;
   num_hosts =  GNUNET_TESTBED_hosts_load_from_file ("sample_hosts.txt",
                                                     &hosts);
-  GNUNET_assert (5 == num_hosts);
+  GNUNET_assert (15 == num_hosts);
   GNUNET_assert (NULL != hosts);
+  status = GNUNET_YES;
   shutdown_id =
       GNUNET_SCHEDULER_add_delayed (TIME_REL_SECS (2), &do_shutdown, NULL);
 }
@@ -117,7 +119,7 @@ main (int argc, char **argv)
     GNUNET_GETOPT_OPTION_END
   };
 
-  status = GNUNET_YES;
+  status = GNUNET_SYSERR;
   if (GNUNET_OK !=
       GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2,
                           "test_testbed_api_hosts", "nohelp", options, &run,