dovecot-2.0: lib-auth: Crashfix.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Oct 21 02:41:58 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/7df7b68ad503
changeset: 10115:7df7b68ad503
user: Timo Sirainen <tss at iki.fi>
date: Tue Oct 20 19:40:52 2009 -0400
description:
lib-auth: Crashfix.
diffstat:
1 file changed, 8 insertions(+), 6 deletions(-)
src/lib-auth/auth-server-connection.c | 14 ++++++++------
diffs (24 lines):
diff -r f08cf2a07907 -r 7df7b68ad503 src/lib-auth/auth-server-connection.c
--- a/src/lib-auth/auth-server-connection.c Tue Oct 20 19:24:51 2009 -0400
+++ b/src/lib-auth/auth-server-connection.c Tue Oct 20 19:40:52 2009 -0400
@@ -317,12 +317,14 @@ static void auth_server_connection_close
timeout_remove(&conn->to);
if (conn->io != NULL)
io_remove(&conn->io);
- i_stream_destroy(&conn->input);
- o_stream_destroy(&conn->output);
-
- if (close(conn->fd) < 0)
- i_error("close(auth server connection) failed: %m");
- conn->fd = -1;
+ if (conn->fd != -1) {
+ i_stream_destroy(&conn->input);
+ o_stream_destroy(&conn->output);
+
+ if (close(conn->fd) < 0)
+ i_error("close(auth server connection) failed: %m");
+ conn->fd = -1;
+ }
auth_server_connection_remove_requests(conn);
More information about the dovecot-cvs
mailing list