From 211920f3ef774ab6009814d40caca9358881ba34 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 19 Sep 2011 12:06:46 +0000 Subject: trying to fix Regis's problem --- ChangeLog | 3 +++ src/daemon/connection.c | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44ef5322..12b112c0 100644 --- 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 index 1b95379c..00188a84 100644 --- 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)) { -- cgit v1.2.3