aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/daemon.c')
-rw-r--r--src/daemon/daemon.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
index 3935832e..2a2636db 100644
--- a/src/daemon/daemon.c
+++ b/src/daemon/daemon.c
@@ -265,6 +265,7 @@ static void
265MHD_cleanup_sessions(struct MHD_Daemon * daemon) { 265MHD_cleanup_sessions(struct MHD_Daemon * daemon) {
266 struct MHD_Session * pos; 266 struct MHD_Session * pos;
267 struct MHD_Session * prev; 267 struct MHD_Session * prev;
268 struct MHD_HTTP_Header * hpos;
268 269
269 pos = daemon->connections; 270 pos = daemon->connections;
270 prev = NULL; 271 prev = NULL;
@@ -283,8 +284,15 @@ MHD_cleanup_sessions(struct MHD_Daemon * daemon) {
283 free(pos->write_buffer); 284 free(pos->write_buffer);
284 if (pos->read_buffer != NULL) 285 if (pos->read_buffer != NULL)
285 free(pos->read_buffer); 286 free(pos->read_buffer);
286 /* FIXME: free headers_received here! */ 287 while (pos->headers_received != NULL) {
287 /* FIXME: more to free here: response, more? */ 288 hpos = pos->headers_received;
289 pos->headers_received = hpos->next;
290 free(hpos->header);
291 free(hpos->value);
292 }
293
294 if (pos->response != NULL)
295 MHD_destroy_response(pos->response);
288 free(pos); 296 free(pos);
289 } 297 }
290 prev = pos; 298 prev = pos;