Skip to content

Commit

Permalink
refactor: add missed defer cleanup calls (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar authored Dec 2, 2023
1 parent d8da79f commit ac84d0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions protocol/assertion.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit ac84d0f

Please sign in to comment.