]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Fix memory leak when building oauth2 failure JSON reply
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sat, 15 Feb 2025 07:12:25 +0000 (09:12 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Sat, 15 Feb 2025 15:51:24 +0000 (15:51 +0000)
Broken by 4bf8b11f5196752bb928baf59e48f9774bb0ce59

src/auth/mech-oauth2.c

index a934b9e07108eacc6d4540a87eec5a70cb24a0c8..43661cd4e49a0c7b78d034c7193cb0dd030fd0f9 100644 (file)
@@ -72,6 +72,7 @@ oauth2_send_failure(struct oauth2_auth_request *oauth2_req, int code,
                i_panic("JSON failed: %s",
                        json_ostream_get_error(gen));
        }
+       json_ostream_destroy(&gen);
 
        oauth2_req->failed = TRUE;
        auth_request_fail_with_reply(request, str->data, str->used);