summaryrefslogtreecommitdiffstats
path: root/app/oauth.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/oauth.go')
-rw-r--r--app/oauth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/oauth.go b/app/oauth.go
index 909d16628..5a02f6238 100644
--- a/app/oauth.go
+++ b/app/oauth.go
@@ -685,7 +685,7 @@ func (a *App) AuthorizeOAuthUser(w http.ResponseWriter, r *http.Request, service
return nil, "", stateProps, model.NewAppError("AuthorizeOAuthUser", "api.user.authorize_oauth_user.token_failed.app_error", nil, err.Error(), http.StatusInternalServerError)
} else {
ar = model.AccessResponseFromJson(resp.Body)
- resp.Body.Close()
+ consumeAndClose(resp)
if ar == nil {
return nil, "", stateProps, model.NewAppError("AuthorizeOAuthUser", "api.user.authorize_oauth_user.bad_response.app_error", nil, "response_body="+string(bodyBytes), http.StatusInternalServerError)