From e0091d6616b552730687c3f64068d1140c9bada0 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 25 May 2023 01:39:18 +0200 Subject: [PATCH] c8d: ImageService.softImageDelete: rename var that collided with import Signed-off-by: Sebastiaan van Stijn (cherry picked from commit f17c9e4aeb479307e6ee03a63663004b2bafb28c) Signed-off-by: Bjorn Neergaard --- daemon/containerd/soft_delete.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/containerd/soft_delete.go b/daemon/containerd/soft_delete.go index c38883b805..ecba46e62a 100644 --- a/daemon/containerd/soft_delete.go +++ b/daemon/containerd/soft_delete.go @@ -19,10 +19,10 @@ func (i *ImageService) softImageDelete(ctx context.Context, img containerdimages // If the image already exists, persist it as dangling image // but only if no other image has the same target. - digest := img.Target.Digest.String() - imgs, err := is.List(ctx, "target.digest=="+digest) + dgst := img.Target.Digest.String() + imgs, err := is.List(ctx, "target.digest=="+dgst) if err != nil { - return errdefs.System(errors.Wrapf(err, "failed to check if there are images targeting digest %s", digest)) + return errdefs.System(errors.Wrapf(err, "failed to check if there are images targeting digest %s", dgst)) } // From this point explicitly ignore the passed context