mirror of
https://github.com/moby/buildkit.git
synced 2026-08-04 14:50:21 +00:00
solver: fix possible nil dereference
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
@@ -211,10 +211,12 @@ func (ei *edgeIndex) getAllMatches(k *CacheKey) []string {
|
||||
for _, d := range dd {
|
||||
ll := CacheInfoLink{Input: Index(i), Digest: k.Digest(), Output: k.Output(), Selector: d.Selector}
|
||||
for _, ckID := range d.CacheKey.CacheKey.indexIDs {
|
||||
if l, ok := ei.items[ckID].links[ll]; ok {
|
||||
if _, ok := l[m]; ok {
|
||||
found = true
|
||||
break
|
||||
if item, ok := ei.items[ckID]; ok {
|
||||
if l, ok := item.links[ll]; ok {
|
||||
if _, ok := l[m]; ok {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user