Commit f3aab346 authored by Geoff Simmons's avatar Geoff Simmons

Robustness against nil derefs in varnish.Controller.HasConfig().

parent 40ceebc2
......@@ -693,12 +693,21 @@ func (vc *Controller) HasConfig(svcKey string, spec vcl.Spec,
if !ok {
return false
}
if svc == nil {
return false
}
if !svc.cfgLoaded {
return false
}
if svc.spec.ings == nil {
return false
}
if len(ingsMeta) != len(svc.spec.ings) {
return false
}
if svc.spec.bcfg == nil {
return false
}
if len(bcfgMeta) != len(svc.spec.bcfg) {
return false
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment