dovecot-2.2: lib-http: If SSL init/handshake fails for connectio...

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 4 14:41:12 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/d3921050f540
changeset: 16150:d3921050f540
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 04 14:41:06 2013 +0300
description:
lib-http: If SSL init/handshake fails for connection, destroy it.

diffstat:

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

diffs (15 lines):

diff -r 74eb53f797d6 -r d3921050f540 src/lib-http/http-client-connection.c
--- a/src/lib-http/http-client-connection.c	Thu Apr 04 14:30:41 2013 +0300
+++ b/src/lib-http/http-client-connection.c	Thu Apr 04 14:41:06 2013 +0300
@@ -738,8 +738,10 @@
 	} else {
 		http_client_connection_debug(conn, "Connected");
 		if (conn->peer->addr.ssl) {
-			if (http_client_connection_ssl_init(conn) < 0)
+			if (http_client_connection_ssl_init(conn) < 0) {
 				http_client_peer_connection_failure(conn->peer);
+				http_client_connection_unref(&conn);
+			}
 			return;
 		}
 		http_client_connection_ready(conn);


More information about the dovecot-cvs mailing list