(no commit message)
authorMatthias Wachs <wachs@net.in.tum.de>
Fri, 28 May 2010 11:41:48 +0000 (11:41 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Fri, 28 May 2010 11:41:48 +0000 (11:41 +0000)
src/transport/plugin_transport_http.c

index 0fa22af643808231b70c433d096348878e277d14..70a6a9671f740de894c7c680024e9f49b91d57ad 100644 (file)
@@ -666,6 +666,7 @@ static int remove_http_message(struct Session * ses, struct HTTP_Message * msg)
     ses->pending_outbound_msg = cur->next;
     GNUNET_free (cur->buf);
     GNUNET_free (cur);
+    cur = NULL;
     return GNUNET_OK;
   }
 
@@ -680,6 +681,7 @@ static int remove_http_message(struct Session * ses, struct HTTP_Message * msg)
   cur->next = cur->next->next;
   GNUNET_free (cur->next->buf);
   GNUNET_free (cur->next);
+  cur->next = NULL;
   return GNUNET_OK;
 
 
@@ -1143,7 +1145,8 @@ libgnunet_plugin_transport_http_done (void *cls)
       while (cur != NULL)
       {
          tmp = cur->next;
-         GNUNET_free (cur->buf);
+         if (NULL != cur->buf)
+           GNUNET_free (cur->buf);
          GNUNET_free (cur);
          cur = tmp;
       }