From e69e7b734b625de1f8921b7e0d92afa1df6b900d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 4 May 2010 01:31:31 +0300 Subject: [PATCH] auth: Don't crash when auth requests timeout. --HG-- branch : HEAD --- src/auth/auth-request-handler.c | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- 2.47.3