dovecot-2.2: lib-http: Make sure we don't access already freed c...

dovecot at dovecot.org dovecot at dovecot.org
Wed Oct 29 00:16:29 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/0393f550fd82
changeset: 18040:0393f550fd82
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Oct 28 17:15:31 2014 -0700
description:
lib-http: Make sure we don't access already freed client connection in payload-destroyed callback.

diffstat:

 src/lib-http/http-client-connection.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (19 lines):

diff -r 1632ae08c986 -r 0393f550fd82 src/lib-http/http-client-connection.c
--- a/src/lib-http/http-client-connection.c	Tue Oct 28 17:07:21 2014 -0700
+++ b/src/lib-http/http-client-connection.c	Tue Oct 28 17:15:31 2014 -0700
@@ -441,6 +441,7 @@
 	req->conn = NULL;
 	conn->incoming_payload = NULL;
 	conn->pending_request = NULL;
+	http_client_connection_ref(conn);
 	http_client_request_finish(&req);
 
 	/* room for new requests */
@@ -457,6 +458,7 @@
 
 	i_assert(req != NULL);
 	http_client_request_unref(&req);
+	http_client_connection_unref(&conn);
 }
 
 static bool


More information about the dovecot-cvs mailing list