Change-Id: I5bccef3c46072e388bfe9985e70745853f673a42
GitHub-Last-Rev:
adee7b9f7fa21c3ee5561b8233bbfe94168e45ed
GitHub-Pull-Request: golang/go#66829
Reviewed-on: https://go-review.googlesource.com/c/go/+/578875
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
if err != nil {
return nil, err
}
+ defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- defer resp.Body.Close()
return nil, statusCodeError(resp)
}
return profile.Parse(resp.Body)