G601: Implicit memory aliasing in for loop
daemon/cluster/executor/container/adapter.go:446:42: G601: Implicit memory aliasing in for loop. (gosec) req := c.container.volumeCreateRequest(&mount) ^ daemon/network.go:577:10: G601: Implicit memory aliasing in for loop. (gosec) np := &n ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
d13997b4ba
commit
b4c0c7c076
2 changed files with 4 additions and 3 deletions
|
@ -431,6 +431,7 @@ func (c *containerAdapter) remove(ctx context.Context) error {
|
|||
func (c *containerAdapter) createVolumes(ctx context.Context) error {
|
||||
// Create plugin volumes that are embedded inside a Mount
|
||||
for _, mount := range c.container.task.Spec.GetContainer().Mounts {
|
||||
mount := mount
|
||||
if mount.Type != api.MountTypeVolume {
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -573,9 +573,9 @@ func (daemon *Daemon) GetNetworks(filter filters.Args, config types.NetworkListC
|
|||
}
|
||||
|
||||
if config.Detailed {
|
||||
for i, n := range list {
|
||||
np := &n
|
||||
buildDetailedNetworkResources(np, idx[n.ID], config.Verbose)
|
||||
for i := range list {
|
||||
np := &list[i]
|
||||
buildDetailedNetworkResources(np, idx[np.ID], config.Verbose)
|
||||
list[i] = *np
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue