From: Christian Grothoff Date: Fri, 15 Jul 2011 11:46:26 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~17829 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7c71131a27b6838dfaf5f2d88db95fbcc0acc104;p=oweals%2Fgnunet.git fix --- diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c index 8631fc347..c2c7b96a8 100644 --- a/src/transport/test_transport_api_unreliability.c +++ b/src/transport/test_transport_api_unreliability.c @@ -591,8 +591,13 @@ setup_peer (struct PeerContext *p, const char *cfgname) GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); if (GNUNET_CONFIGURATION_have_value (p->cfg,"PATHS", "SERVICEHOME")) - GNUNET_CONFIGURATION_get_value_string (p->cfg, "PATHS", "SERVICEHOME", &p->servicehome); - GNUNET_DISK_directory_remove (p->servicehome); + { + GNUNET_assert (GNUNET_OK == + GNUNET_CONFIGURATION_get_value_string (p->cfg, + "PATHS", "SERVICEHOME", + &p->servicehome)); + GNUNET_DISK_directory_remove (p->servicehome); + } #if START_ARM @@ -870,15 +875,16 @@ check () GNUNET_free(cert_file_p2); } - if ((p1.servicehome != NULL) && (p2.servicehome != NULL)) - { - GNUNET_DISK_directory_remove (p1.servicehome); - GNUNET_DISK_directory_remove (p2.servicehome); - GNUNET_free(p1.servicehome); - GNUNET_free(p2.servicehome); - } - return ok; - + if (p1.servicehome != NULL) + { + GNUNET_DISK_directory_remove (p1.servicehome); + GNUNET_free(p1.servicehome); + } + if (p2.servicehome != NULL) + { + GNUNET_free(p2.servicehome); + GNUNET_DISK_directory_remove (p2.servicehome); + } return ok; }