From 2816c55f3a7138a04837694afa8bf0a515fe00ac Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Fri, 16 Apr 2021 11:06:33 -0400 Subject: Update all containers/ project vendors Bumps: - c/storage to v1.29.0 - c/image to v5.11.0 - c/common to v0.36.0 - Buildah to v1.20.1 Signed-off-by: Matthew Heon --- .../github.com/Microsoft/hcsshim/computestorage/helpers.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'vendor/github.com/Microsoft/hcsshim/computestorage/helpers.go') diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/helpers.go b/vendor/github.com/Microsoft/hcsshim/computestorage/helpers.go index d31efd660..87fee452c 100644 --- a/vendor/github.com/Microsoft/hcsshim/computestorage/helpers.go +++ b/vendor/github.com/Microsoft/hcsshim/computestorage/helpers.go @@ -70,11 +70,9 @@ func SetupContainerBaseLayer(ctx context.Context, layerPath, baseVhdPath, diffVh defer func() { if err != nil { - syscall.CloseHandle(handle) + _ = syscall.CloseHandle(handle) os.RemoveAll(baseVhdPath) - if os.Stat(diffVhdPath); err == nil { - os.RemoveAll(diffVhdPath) - } + os.RemoveAll(diffVhdPath) } }() @@ -148,11 +146,9 @@ func SetupUtilityVMBaseLayer(ctx context.Context, uvmPath, baseVhdPath, diffVhdP defer func() { if err != nil { - syscall.CloseHandle(handle) + _ = syscall.CloseHandle(handle) os.RemoveAll(baseVhdPath) - if os.Stat(diffVhdPath); err == nil { - os.RemoveAll(diffVhdPath) - } + os.RemoveAll(diffVhdPath) } }() -- cgit v1.2.3-54-g00ecf