[dovecot-cvs] dovecot/src/auth auth-request-handler.c,1.11,1.12

cras at dovecot.org cras at dovecot.org
Sat Jan 28 23:09:45 EET 2006


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv17037

Modified Files:
	auth-request-handler.c 
Log Message:
If authentication client disconnects while it still has pending requests,
don't crash (got broken in the large pointer-change commit).



Index: auth-request-handler.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-request-handler.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- auth-request-handler.c	14 Jan 2006 18:47:20 -0000	1.11
+++ auth-request-handler.c	28 Jan 2006 21:09:43 -0000	1.12
@@ -62,8 +62,11 @@
 		return;
 
 	iter = hash_iterate_init(handler->requests);
-	while (hash_iterate(iter, &key, &value))
-		auth_request_unref(value);
+	while (hash_iterate(iter, &key, &value)) {
+		struct auth_request *auth_request = value;
+
+		auth_request_unref(&auth_request);
+	}
 	hash_iterate_deinit(iter);
 
 	/* notify parent that we're done with all requests */



More information about the dovecot-cvs mailing list