From: Timo Sirainen Date: Mon, 3 May 2010 22:31:31 +0000 (+0300) Subject: auth: Don't crash when auth requests timeout. X-Git-Tag: 2.0.beta5~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e69e7b734b625de1f8921b7e0d92afa1df6b900d;p=thirdparty%2Fdovecot%2Fcore.git auth: Don't crash when auth requests timeout. --HG-- branch : HEAD --- diff --git a/src/auth/auth-request-handler.c b/src/auth/auth-request-handler.c index 2475addb13..4fff875d6c 100644 --- a/src/auth/auth-request-handler.c +++ b/src/auth/auth-request-handler.c @@ -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); }