From 68c7a3abdf766d175ea68a1832e46590207c899c Mon Sep 17 00:00:00 2001 From: Mitar Date: Sat, 2 Dec 2023 10:42:28 -0800 Subject: [PATCH] Missed defer cleanup calls. --- protocol/assertion.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/protocol/assertion.go b/protocol/assertion.go index a82313a2..897a56cd 100644 --- a/protocol/assertion.go +++ b/protocol/assertion.go @@ -51,6 +51,9 @@ func ParseCredentialRequestResponse(response *http.Request) (*ParsedCredentialAs return nil, ErrBadRequest.WithDetails("No response given") } + defer response.Body.Close() + defer io.Copy(io.Discard, response.Body) + return ParseCredentialRequestResponseBody(response.Body) }