From fc2c26175d1504b73ec63ab76d7428d53e59d180 Mon Sep 17 00:00:00 2001
From: ningmingxiao <ning.mingxiao@zte.com.cn>
Date: Mon, 6 Dec 2021 21:36:31 +0800
Subject: [PATCH] fix Implicit memory aliasing in for loop

Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
---
 containerstore.go | 1 +
 image_store.go    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/containerstore.go b/containerstore.go
index 2756e2a68..bdd1c6066 100644
--- a/containerstore.go
+++ b/containerstore.go
@@ -189,6 +189,7 @@ func containersFromProto(containerspb []containersapi.Container) []containers.Co
 	var containers []containers.Container
 
 	for _, container := range containerspb {
+		container := container
 		containers = append(containers, containerFromProto(&container))
 	}
 
diff --git a/image_store.go b/image_store.go
index 3676bdada..7e44c73cc 100644
--- a/image_store.go
+++ b/image_store.go
@@ -129,6 +129,7 @@ func imagesFromProto(imagespb []imagesapi.Image) []images.Image {
 	var images []images.Image
 
 	for _, image := range imagespb {
+		image := image
 		images = append(images, imageFromProto(&image))
 	}
 
-- 
2.33.0

