Don't try to use req if we got a nonzero status, it'll be nil. (#7728)

This commit is contained in:
ncabatoff 2019-10-24 13:37:13 -04:00 committed by GitHub
parent 87207df0df
commit 1fc0bee2ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ func buildLogicalRequestNoAuth(perfStandby bool, w http.ResponseWriter, r *http.
func buildLogicalRequest(core *vault.Core, w http.ResponseWriter, r *http.Request) (*logical.Request, io.ReadCloser, int, error) {
req, origBody, status, err := buildLogicalRequestNoAuth(core.PerfStandby(), w, r)
if err != nil {
if err != nil || status != 0 {
return nil, nil, status, err
}