]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Don't leak memory if auth client sends a buggy request.
authorTimo Sirainen <tss@iki.fi>
Fri, 19 Feb 2010 02:28:07 +0000 (04:28 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 19 Feb 2010 02:28:07 +0000 (04:28 +0200)
--HG--
branch : HEAD

src/auth/auth-request-handler.c

index 7fc54235b76a4d2a103a815909b54c95e0d0ae00..b828dea419adfd1519b17aad7514372c4ebc9ac0 100644 (file)
@@ -366,6 +366,7 @@ bool auth_request_handler_auth_begin(struct auth_request_handler *handler,
                i_error("BUG: Authentication client %u "
                        "sent AUTH parameters after 'resp'",
                        handler->client_pid);
+               auth_request_unref(&request);
                return FALSE;
        }
 
@@ -373,6 +374,7 @@ bool auth_request_handler_auth_begin(struct auth_request_handler *handler,
                i_error("BUG: Authentication client %u "
                        "didn't specify service in request",
                        handler->client_pid);
+               auth_request_unref(&request);
                return FALSE;
        }