]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Don't crash when auth requests timeout.
authorTimo Sirainen <tss@iki.fi>
Mon, 3 May 2010 22:31:31 +0000 (01:31 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 3 May 2010 22:31:31 +0000 (01:31 +0300)
--HG--
branch : HEAD

src/auth/auth-request-handler.c

index 2475addb1386e28a1ceb542dbd95cbf6635a6ed1..4fff875d6c7ea1111c5a26833552271044612551 100644 (file)
@@ -95,6 +95,10 @@ static void auth_request_handler_remove(struct auth_request_handler *handler,
 {
        i_assert(request->handler == handler);
 
+       /* if db lookup is stuck, this call doesn't actually free the auth
+          request, so make sure we don't get back here. */
+       timeout_remove(&request->to_abort);
+
        hash_table_remove(handler->requests, POINTER_CAST(request->id));
        auth_request_unref(&request);
 }