Mercurial > dovecot > core-2.2
changeset 18040:0393f550fd82
lib-http: Make sure we don't access already freed client connection in payload-destroyed callback.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 28 Oct 2014 17:15:31 -0700 |
parents | 1632ae08c986 |
children | 297192cfbd37 |
files | src/lib-http/http-client-connection.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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