From 4c041403c25495dd8a9611468c1f6d6dbbb35a68 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 2 Aug 2011 13:29:06 +0000 Subject: [PATCH] fixleak --- src/transport/plugin_transport_http.c | 2 +- src/transport/test_transport_api.c | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index b0979fc88..e63549784 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c @@ -2613,7 +2613,7 @@ http_plugin_send (void *cls, ps->send_force_disconnect = GNUNET_NO; ps->pending_msgs_head = NULL; ps->pending_msgs_tail = NULL; - ps->peercontext=pc; + ps->peercontext = pc; ps->session_id = pc->session_id_counter; ps->queue_length_cur = 0; ps->queue_length_max = GNUNET_SERVER_MAX_MESSAGE_SIZE; diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index cdad7b798..84cb2421d 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c @@ -296,14 +296,9 @@ setup_peer (struct PeerContext *p, GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); if (GNUNET_CONFIGURATION_have_value (p->cfg,"PATHS", "SERVICEHOME")) - { - GNUNET_assert (GNUNET_OK == - GNUNET_CONFIGURATION_get_value_string (p->cfg, - "PATHS", - "SERVICEHOME", - &p->servicehome)); - GNUNET_DISK_directory_remove (p->servicehome); - } + GNUNET_CONFIGURATION_get_value_string (p->cfg, "PATHS", "SERVICEHOME", &p->servicehome); + if (NULL != p->servicehome) + GNUNET_DISK_directory_remove (p->servicehome); #if START_ARM p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", @@ -315,8 +310,6 @@ setup_peer (struct PeerContext *p, #endif - if (GNUNET_CONFIGURATION_have_value (p->cfg,"PATHS", "SERVICEHOME")) - GNUNET_CONFIGURATION_get_value_string (p->cfg, "PATHS", "SERVICEHOME", &p->servicehome); if (is_https) { -- 2.25.1