Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit 5848b5b

Browse files
committed
cri/config: fix range iterator issue in ValidatePluginConfig
Go uses the same address variable while iterating in a range, so use a copy when using its address. Signed-off-by: Gaurav Singh <[email protected]> (cherry picked from commit containerd/containerd@071a185) Signed-off-by: Shengjing Zhu <[email protected]>
1 parent 779131a commit 5848b5b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

pkg/config/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ func ValidatePluginConfig(ctx context.Context, c *PluginConfig) error {
352352
c.Registry.Configs = make(map[string]RegistryConfig)
353353
}
354354
for endpoint, auth := range c.Registry.Auths {
355+
auth := auth
355356
config := c.Registry.Configs[endpoint]
356357
config.Auth = &auth
357358
c.Registry.Configs[endpoint] = config

0 commit comments

Comments
 (0)