mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Fix implicit memory aliasing in for loop
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -39,6 +39,7 @@ func (r remove) Transform(spec *specs.Spec) error {
|
||||
}
|
||||
|
||||
for _, device := range spec.Devices {
|
||||
device := device
|
||||
if err := r.transformEdits(&device.ContainerEdits); err != nil {
|
||||
return fmt.Errorf("failed to remove edits from device %q: %w", device.Name, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user