dovecot-2.2: lib-http: Don't leak memory if HTTP client disconne...

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 11 12:47:33 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/9f4529061c5d
changeset: 17695:9f4529061c5d
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 11 15:45:21 2014 +0300
description:
lib-http: Don't leak memory if HTTP client disconnects unexpectedly.
http_server_connection_disconnect() has several cleanup calls, which weren't
done because closed=TRUE was set explicitly and that skipped the cleanup.

diffstat:

 src/lib-http/http-server-connection.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 0098ed2b4b50 -r 9f4529061c5d src/lib-http/http-server-connection.c
--- a/src/lib-http/http-server-connection.c	Mon Aug 11 14:18:53 2014 +0300
+++ b/src/lib-http/http-server-connection.c	Mon Aug 11 15:45:21 2014 +0300
@@ -17,6 +17,10 @@
 
 #include "http-server-private.h"
 
+static void
+http_server_connection_disconnect(struct http_server_connection *conn,
+	const char *reason);
+
 /*
  * Logging
  */
@@ -163,7 +167,7 @@
 	struct http_server_connection *conn =
 		(struct http_server_connection *)_conn;
 
-	conn->closed = TRUE;
+	http_server_connection_disconnect(conn, NULL);
 	http_server_connection_unref(&conn);
 }
 


More information about the dovecot-cvs mailing list