From 4f4e228274cee8b6bc82f6585305f13961ca16dd Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Fri, 10 Nov 2017 14:21:22 +0100 Subject: [PATCH] pkg: storage: image: close image after using it Signed-off-by: Antonio Murdaca --- pkg/storage/image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storage/image.go b/pkg/storage/image.go index 2b0478cd..011e5a5d 100644 --- a/pkg/storage/image.go +++ b/pkg/storage/image.go @@ -159,8 +159,8 @@ func (svc *imageService) ImageStatus(systemContext *types.SystemContext, nameOrI if err != nil { return nil, err } + defer img.Close() size := imageSize(img) - img.Close() result := ImageResult{ ID: image.ID,