From: Timo Sirainen Date: Sat, 15 Feb 2025 07:12:25 +0000 (+0200) Subject: auth: Fix memory leak when building oauth2 failure JSON reply X-Git-Tag: 2.4.1~198 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cf330e0ddfe0fcfb3384bdefd19025278b5b993;p=thirdparty%2Fdovecot%2Fcore.git auth: Fix memory leak when building oauth2 failure JSON reply Broken by 4bf8b11f5196752bb928baf59e48f9774bb0ce59 --- diff --git a/src/auth/mech-oauth2.c b/src/auth/mech-oauth2.c index a934b9e071..43661cd4e4 100644 --- a/src/auth/mech-oauth2.c +++ b/src/auth/mech-oauth2.c @@ -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);