mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-25 22:18:23 +02:00
fix: memory leakage (#3285)
This commit is contained in:
parent
74310b3de3
commit
a26a83c247
1 changed files with 1 additions and 1 deletions
|
@ -111,11 +111,11 @@ func Authenticate(ctx context.Context, client *http.Client, url *url.URL, option
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
defer res.Body.Close()
|
||||||
bodyBytes, err := io.ReadAll(res.Body)
|
bodyBytes, err := io.ReadAll(res.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer res.Body.Close()
|
|
||||||
url, err = url.Parse(string(bodyBytes))
|
url, err = url.Parse(string(bodyBytes))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue