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 <gaurav1086@gmail.com>
This commit is contained in:
parent
7126310a09
commit
071a185506
@ -352,6 +352,7 @@ func ValidatePluginConfig(ctx context.Context, c *PluginConfig) error {
|
||||
c.Registry.Configs = make(map[string]RegistryConfig)
|
||||
}
|
||||
for endpoint, auth := range c.Registry.Auths {
|
||||
auth := auth
|
||||
config := c.Registry.Configs[endpoint]
|
||||
config.Auth = &auth
|
||||
c.Registry.Configs[endpoint] = config
|
||||
|
Loading…
Reference in New Issue
Block a user