aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_reliability.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-07-15 11:45:00 +0000
committerChristian Grothoff <christian@grothoff.org>2011-07-15 11:45:00 +0000
commitea166ccd05b84e4518016b1d6d85434e180dfd1a (patch)
treef593be28182c8afab92ca39e8e1a2db4b615fa2d /src/transport/test_transport_api_reliability.c
parent1a9e2a8a3dd9bba7652d6099e6fa0553caef8d09 (diff)
downloadgnunet-ea166ccd05b84e4518016b1d6d85434e180dfd1a.tar.gz
gnunet-ea166ccd05b84e4518016b1d6d85434e180dfd1a.zip
fix
Diffstat (limited to 'src/transport/test_transport_api_reliability.c')
-rw-r--r--src/transport/test_transport_api_reliability.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index 03a2458b2..182354830 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -475,8 +475,13 @@ setup_peer (struct PeerContext *p, const char *cfgname)
475 p->cfg = GNUNET_CONFIGURATION_create (); 475 p->cfg = GNUNET_CONFIGURATION_create ();
476 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); 476 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
477 if (GNUNET_CONFIGURATION_have_value (p->cfg,"PATHS", "SERVICEHOME")) 477 if (GNUNET_CONFIGURATION_have_value (p->cfg,"PATHS", "SERVICEHOME"))
478 GNUNET_CONFIGURATION_get_value_string (p->cfg, "PATHS", "SERVICEHOME", &p->servicehome); 478 {
479 GNUNET_DISK_directory_remove (p->servicehome); 479 GNUNET_assert (GNUNET_OK ==
480 GNUNET_CONFIGURATION_get_value_string (p->cfg,
481 "PATHS", "SERVICEHOME",
482 &p->servicehome));
483 GNUNET_DISK_directory_remove (p->servicehome);
484 }
480 485
481#if START_ARM 486#if START_ARM
482 p->arm_proc = GNUNET_OS_start_process (NULL, NULL, 487 p->arm_proc = GNUNET_OS_start_process (NULL, NULL,
@@ -839,8 +844,6 @@ check ()
839 GNUNET_free(key_file_p2); 844 GNUNET_free(key_file_p2);
840 GNUNET_free(cert_file_p1); 845 GNUNET_free(cert_file_p1);
841 GNUNET_free(cert_file_p2); 846 GNUNET_free(cert_file_p2);
842 GNUNET_free(p1.servicehome);
843 GNUNET_free(p2.servicehome);
844 } 847 }
845 848
846 return ok; 849 return ok;
@@ -896,8 +899,16 @@ main (int argc, char *argv[])
896#endif 899#endif
897 NULL); 900 NULL);
898 ret = check (); 901 ret = check ();
899 GNUNET_DISK_directory_remove (p1.servicehome); 902 if (p1.servicehome != NULL)
900 GNUNET_DISK_directory_remove (p2.servicehome); 903 {
904 GNUNET_DISK_directory_remove (p1.servicehome);
905 GNUNET_free (p1.servicehome);
906 }
907 if (p2.servicehome != NULL)
908 {
909 GNUNET_free_non_null (p2.servicehome);
910 GNUNET_DISK_directory_remove (p2.servicehome);
911 }
901 return ret; 912 return ret;
902} 913}
903 914