dovecot-2.0: auth: Abort any pending SQL requests earler to avoi...

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 23 18:09:17 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/8b85c3b89343
changeset: 12034:8b85c3b89343
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 23 15:59:22 2010 +0100
description:
auth: Abort any pending SQL requests earler to avoid crashes.

diffstat:

 src/auth/db-sql.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r b88b207b79b2 -r 8b85c3b89343 src/auth/db-sql.c
--- a/src/auth/db-sql.c	Mon Aug 23 15:58:53 2010 +0100
+++ b/src/auth/db-sql.c	Mon Aug 23 15:59:22 2010 +0100
@@ -112,6 +112,10 @@
 {
         struct sql_connection *conn = *_conn;
 
+	/* abort all pending auth requests before setting conn to NULL,
+	   so that callbacks can still access it */
+	sql_disconnect(conn->db);
+
 	*_conn = NULL;
 	if (--conn->refcount > 0)
 		return;


More information about the dovecot-cvs mailing list