libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 211920f3ef774ab6009814d40caca9358881ba34
parent e9cf773a0ae6367ea21eb9d98a01e4a4088ce0e5
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 19 Sep 2011 12:06:46 +0000

trying to fix Regis's problem

Diffstat:
MChangeLog | 3+++
Msrc/daemon/connection.c | 10+++++-----
2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,6 @@ +Mon Sep 19 14:06:30 CEST 2011 + Fixing problem introduced with prompt response cleanup code. -CG + Wed Sep 14 13:43:26 CEST 2011 Fixing minor memory leak if daemon with HTTPS support failed to initialize (#1766). -CG diff --git a/src/daemon/connection.c b/src/daemon/connection.c @@ -311,11 +311,6 @@ MHD_connection_close (struct MHD_Connection *connection, &connection->client_context, termination_code); connection->client_aware = MHD_NO; - if (connection->response != NULL) - { - MHD_destroy_response (connection->response); - connection->response = NULL; - } } @@ -2291,6 +2286,11 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) } continue; case MHD_CONNECTION_CLOSED: + if (connection->response != NULL) + { + MHD_destroy_response (connection->response); + connection->response = NULL; + } daemon = connection->daemon; if (0 != pthread_mutex_lock(&daemon->cleanup_connection_mutex)) {