Skip to content

Commit

Permalink
Fix nil dereference panic on request timeout (openshift#906)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilebox authored and arschles committed May 31, 2017
1 parent d8c7494 commit 3e4120e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ func (c *openServiceBrokerClient) CreateServiceInstance(ID string, req *brokerap
)
if err != nil {
glog.Errorf("Error sending create service instance request to broker %q at %v: response: %v error: %#v", c.name, serviceInstanceURL, resp, err)
return nil, resp.StatusCode, errRequest{message: err.Error()}
errReq := errRequest{message: err.Error()}
if resp == nil {
return nil, 0, errReq
}
return nil, resp.StatusCode, errReq
}
defer resp.Body.Close()

Expand Down

0 comments on commit 3e4120e

Please sign in to comment.