dovecot-2.2: lib-http: Don't crash if payload stream is referenc...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 27 20:37:56 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/20a0595e6e5d
changeset: 16572:20a0595e6e5d
user: Timo Sirainen <tss at iki.fi>
date: Thu Jun 27 20:37:46 2013 +0300
description:
lib-http: Don't crash if payload stream is referenced by caller after its connection is freed.
diffstat:
src/lib-http/http-client-connection.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (16 lines):
diff -r 9fd54d123e22 -r 20a0595e6e5d src/lib-http/http-client-connection.c
--- a/src/lib-http/http-client-connection.c Thu Jun 27 20:32:01 2013 +0300
+++ b/src/lib-http/http-client-connection.c Thu Jun 27 20:37:46 2013 +0300
@@ -896,6 +896,12 @@
conn->closing = TRUE;
conn->connected = FALSE;
+ if (conn->incoming_payload != NULL) {
+ /* the stream is still accessed by lib-http caller. */
+ i_stream_remove_destroy_callback(conn->incoming_payload,
+ http_client_payload_destroyed);
+ }
+
connection_disconnect(&conn->conn);
/* abort all pending requests */
More information about the dovecot-cvs
mailing list