Fix bug where the same pointer is used. (#3059)

This commit is contained in:
Dai Kurosawa 2020-01-31 02:47:18 +09:00 committed by GitHub
parent a3f8ec33f4
commit c8d74d1a7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1272,8 +1272,9 @@ func (s *Server) plugins() ([]*v1alpha1.ConfigManagementPlugin, error) {
return nil, err
}
tools := make([]*v1alpha1.ConfigManagementPlugin, len(plugins))
for i, plugin := range plugins {
tools[i] = &plugin
for i, p := range plugins {
p := p
tools[i] = &p
}
return tools, nil
}