Return error before creating a client if conf is nil
This commit is contained in:
parent
e2be4bfd74
commit
4f91a71c29
|
@ -44,6 +44,10 @@ func (b *backend) client(s logical.Storage) (*api.Client, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if conf == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
nomadConf := api.DefaultConfig()
|
||||
nomadConf.Address = conf.Address
|
||||
nomadConf.SecretID = conf.Token
|
||||
|
|
Loading…
Reference in New Issue