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:
@@ -34,6 +34,7 @@ var _ oci.SpecModifier = (*fromCDISpec)(nil)
|
||||
// Modify applies the mofiications defined by the raw CDI spec to the incomming OCI spec.
|
||||
func (m fromCDISpec) Modify(spec *specs.Spec) error {
|
||||
for _, device := range m.cdiSpec.Devices {
|
||||
device := device
|
||||
cdiDevice := cdi.Device{
|
||||
Device: &device,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user