dovecot-2.0: lib-master: Crashfix for handling auth master looku...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Apr 7 03:45:50 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/6aaa6fcba131
changeset: 11096:6aaa6fcba131
user: Timo Sirainen <tss at iki.fi>
date: Wed Apr 07 03:16:30 2010 +0300
description:
lib-master: Crashfix for handling auth master lookup failures.
diffstat:
src/lib-master/master-login.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (29 lines):
diff -r f344426dab0a -r 6aaa6fcba131 src/lib-master/master-login.c
--- a/src/lib-master/master-login.c Wed Apr 07 03:03:53 2010 +0300
+++ b/src/lib-master/master-login.c Wed Apr 07 03:16:30 2010 +0300
@@ -426,7 +426,7 @@
if (conn->io != NULL)
io_remove(&conn->io);
- o_stream_unref(&conn->output);
+ o_stream_close(conn->output);
if (close(conn->fd) < 0)
i_error("close(master login) failed: %m");
conn->fd = -1;
@@ -442,10 +442,12 @@
i_assert(conn->refcount > 0);
- if (--conn->refcount == 0) {
- *_conn = NULL;
- i_free(conn);
- }
+ if (--conn->refcount > 0)
+ return;
+
+ *_conn = NULL;
+ o_stream_unref(&conn->output);
+ i_free(conn);
}
void master_login_stop(struct master_login *login)
More information about the dovecot-cvs
mailing list