Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Need one more err check and defer #487

Open
TheRealMal opened this issue Jun 3, 2024 · 1 comment
Open

[Bug] Need one more err check and defer #487

TheRealMal opened this issue Jun 3, 2024 · 1 comment
Labels

Comments

@TheRealMal
Copy link

Another err check should be placed with close defer

if err != nil || resp.StatusCode != http.StatusOK {
resp, err = client.Do(req)
if err != nil || resp.StatusCode != http.StatusOK {
return ""
}
}

Like here
resp, err := client.Do(req)
if err == nil {
defer resp.Body.Close()
}

@bgavrilMS
Copy link
Member

Sorry for the late reply. Can you please describe how this inconsistency affects an app using MSAL Go?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants