From afd3a26b1cdffc4a98a716d496a8c67c49d773bf Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 28 May 2010 11:41:48 +0000 Subject: [PATCH] --- src/transport/plugin_transport_http.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 0fa22af64..70a6a9671 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c @@ -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; } -- 2.25.1