Skip to content

Commit 412ca49

Browse files
authored
Merge pull request containerd#7963 from henry118/gc-bug
use local variable for rt when iterating collectors
2 parents 6044313 + b9bd10c commit 412ca49

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

metadata/gc.go

+1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ func startGCContext(ctx context.Context, collectors map[gc.ResourceType]Collecto
141141
if len(collectors) > 0 {
142142
contexts = map[gc.ResourceType]CollectionContext{}
143143
for rt, collector := range collectors {
144+
rt := rt
144145
c, err := collector.StartCollection(ctx)
145146
if err != nil {
146147
// Only skipping this resource this round

0 commit comments

Comments
 (0)