diff --git a/cmd/ncproxy/ncproxy.go b/cmd/ncproxy/ncproxy.go index a466069264..3610be8a12 100644 --- a/cmd/ncproxy/ncproxy.go +++ b/cmd/ncproxy/ncproxy.go @@ -25,7 +25,6 @@ import ( // GRPC service exposed for use by a Node Network Service. Holds a mutex for // updating global client. type grpcService struct { - m sync.Mutex } var _ ncproxygrpc.NetworkConfigProxyServer = &grpcService{} diff --git a/computestorage/helpers.go b/computestorage/helpers.go index d31efd6609..93546f34d7 100644 --- a/computestorage/helpers.go +++ b/computestorage/helpers.go @@ -72,9 +72,7 @@ func SetupContainerBaseLayer(ctx context.Context, layerPath, baseVhdPath, diffVh if err != nil { syscall.CloseHandle(handle) os.RemoveAll(baseVhdPath) - if os.Stat(diffVhdPath); err == nil { - os.RemoveAll(diffVhdPath) - } + os.RemoveAll(diffVhdPath) } }() @@ -150,9 +148,7 @@ func SetupUtilityVMBaseLayer(ctx context.Context, uvmPath, baseVhdPath, diffVhdP if err != nil { syscall.CloseHandle(handle) os.RemoveAll(baseVhdPath) - if os.Stat(diffVhdPath); err == nil { - os.RemoveAll(diffVhdPath) - } + os.RemoveAll(diffVhdPath) } }()