- fix for 0002383
authorMatthias Wachs <wachs@net.in.tum.de>
Tue, 29 May 2012 08:09:45 +0000 (08:09 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Tue, 29 May 2012 08:09:45 +0000 (08:09 +0000)
src/transport/plugin_transport_http.c
src/transport/plugin_transport_http_server.c

index d55cdb76b108f026672409c6e2ea5372379cf573..2bc82d8f04997ad4912e99d9426d685ebdbd9683 100644 (file)
@@ -601,8 +601,6 @@ delete_session (struct Session *s)
     s->msg_tk = NULL;
   }
   GNUNET_free (s->addr);
-  GNUNET_free_non_null (s->server_recv);
-  GNUNET_free_non_null (s->server_send);
   GNUNET_free (s);
 }
 
index fce6bd1a31353d0c2cebf0c5fd1d2af756983f88..d8383b0a9d82ed1293916b387b6577f76308089c 100644 (file)
@@ -769,9 +769,8 @@ server_disconnect_cb (void *cls, struct MHD_Connection *connection,
                      "Server: %X peer `%s' GET on address `%s' disconnected\n",
                      s->server_send, GNUNET_i2s (&s->target),
                      http_plugin_address_to_string (NULL, s->addr, s->addrlen));
-
+    GNUNET_free (s->server_send);
     s->server_send = NULL;
-
     if (s->server_recv != NULL)
     {
       tc = s->server_recv;
@@ -788,6 +787,7 @@ server_disconnect_cb (void *cls, struct MHD_Connection *connection,
                      "Server: %X peer `%s' PUT on address `%s' disconnected\n",
                      s->server_recv, GNUNET_i2s (&s->target),
                      http_plugin_address_to_string (NULL, s->addr, s->addrlen));
+    GNUNET_free (s->server_recv);
     s->server_recv = NULL;
     if (s->server_send != NULL)
     {