[libsoup] Fix leak in previous commit
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libsoup] Fix leak in previous commit
- Date: Sat, 23 Jan 2010 20:49:08 +0000 (UTC)
commit e5491307570a3e4594968e9a307eaaf7dda5d7ab
Author: Dan Winship <danw gnome org>
Date: Sat Jan 23 15:48:51 2010 -0500
Fix leak in previous commit
libsoup/soup-message-server-io.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/libsoup/soup-message-server-io.c b/libsoup/soup-message-server-io.c
index a75dde7..bc8a1c1 100644
--- a/libsoup/soup-message-server-io.c
+++ b/libsoup/soup-message-server-io.c
@@ -119,7 +119,8 @@ handle_partial_get (SoupMessage *msg)
msg->status_code != SOUP_STATUS_OK ||
soup_message_headers_get_encoding (msg->response_headers) !=
SOUP_ENCODING_CONTENT_LENGTH ||
- msg->response_body->length == 0)
+ msg->response_body->length == 0 ||
+ !soup_message_body_get_accumulate (msg->response_body))
return;
/* Oh, and there has to have been a valid Range header on the
@@ -130,11 +131,11 @@ handle_partial_get (SoupMessage *msg)
&ranges, &nranges))
return;
- if (!soup_message_body_get_accumulate (msg->response_body))
- return;
full_response = soup_message_body_flatten (msg->response_body);
- if (!full_response)
+ if (!full_response) {
+ soup_message_headers_free_ranges (msg->request_headers, ranges);
return;
+ }
soup_message_set_status (msg, SOUP_STATUS_PARTIAL_CONTENT);
soup_message_body_truncate (msg->response_body);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]