[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 01/02: Fixed response leak when upgrade fai
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 01/02: Fixed response leak when upgrade failed |
Date: |
Mon, 15 May 2017 19:22:10 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit e264d9ec9ef98e6f26f5f547ec941927a35ffa56
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Sun May 14 22:30:28 2017 +0300
Fixed response leak when upgrade failed
---
src/microhttpd/connection.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 958bf2ef..8a190053 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3161,14 +3161,11 @@ MHD_connection_handle_idle (struct MHD_Connection
*connection)
#ifdef UPGRADE_SUPPORT
if (NULL != connection->response->upgrade_handler)
{
- struct MHD_Response *resp_clr = connection->response;
-
socket_start_normal_buffering (connection);
connection->state = MHD_CONNECTION_UPGRADE;
- connection->response = NULL;
/* This connection is "upgraded". Pass socket to application. */
if (MHD_YES !=
- MHD_response_execute_upgrade_ (resp_clr,
+ MHD_response_execute_upgrade_ (connection->response,
connection))
{
/* upgrade failed, fail hard */
@@ -3177,8 +3174,8 @@ MHD_connection_handle_idle (struct MHD_Connection
*connection)
continue;
}
/* Response is not required anymore for this connection. */
- if (NULL != resp_clr)
- MHD_destroy_response (resp_clr);
+ if (NULL != connection->response)
+ MHD_destroy_response (connection->response);
continue;
}
#endif /* UPGRADE_SUPPORT */
--
To stop receiving notification emails like this one, please contact
address@hidden