Merge pull request #673 from tonistiigi/nil-value-check
solver: fix possible nil dereferencedocker-18.09
commit
8c8792b234
|
@ -211,10 +211,12 @@ func (ei *edgeIndex) getAllMatches(k *CacheKey) []string {
|
||||||
for _, d := range dd {
|
for _, d := range dd {
|
||||||
ll := CacheInfoLink{Input: Index(i), Digest: k.Digest(), Output: k.Output(), Selector: d.Selector}
|
ll := CacheInfoLink{Input: Index(i), Digest: k.Digest(), Output: k.Output(), Selector: d.Selector}
|
||||||
for _, ckID := range d.CacheKey.CacheKey.indexIDs {
|
for _, ckID := range d.CacheKey.CacheKey.indexIDs {
|
||||||
if l, ok := ei.items[ckID].links[ll]; ok {
|
if item, ok := ei.items[ckID]; ok {
|
||||||
if _, ok := l[m]; ok {
|
if l, ok := item.links[ll]; ok {
|
||||||
found = true
|
if _, ok := l[m]; ok {
|
||||||
break
|
found = true
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue