fixleak
authorChristian Grothoff <christian@grothoff.org>
Tue, 2 Aug 2011 13:29:06 +0000 (13:29 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 2 Aug 2011 13:29:06 +0000 (13:29 +0000)
src/transport/plugin_transport_http.c
src/transport/test_transport_api.c

index b0979fc881b58e43e15685c6cab87b0d4be53c13..e63549784728e1842e1920f04f4d1feff41e9cd8 100644 (file)
@@ -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;
index cdad7b7988af0ad669668a705d150f9bade638ce..84cb2421dff394c9186e68a9742f8c809716ee17 100644 (file)
@@ -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)
     {