Skip to content

Commit 869f225

Browse files
author
Israel Barbosa
committed
Fix infinite loop in cache loop detection algorithm
Signed-off-by: Israel Barbosa <[email protected]>
1 parent 0506df9 commit 869f225

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cache/remotecache/v1/utils.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,8 @@ func (s *normalizeState) checkLoops(ctx context.Context, d digest.Digest, visite
149149
if !ok {
150150
return
151151
}
152+
152153
visited[d] = struct{}{}
153-
defer func() {
154-
delete(visited, d)
155-
}()
156154

157155
for l, ids := range links {
158156
for id := range ids {

0 commit comments

Comments
 (0)