From 6d2a0bafcdd14e1e7c3474d11c586bddf517c618 Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Fri, 28 Oct 2016 15:13:22 -0700 Subject: [PATCH] storagedriver/azure: close leaking response body In GetContent() we read the bytes from a blob but do not close the underlying response body. Signed-off-by: Ahmet Alp Balkan --- registry/storage/driver/azure/azure.go | 1 + 1 file changed, 1 insertion(+) diff --git a/registry/storage/driver/azure/azure.go b/registry/storage/driver/azure/azure.go index b06b0876..b081f31b 100644 --- a/registry/storage/driver/azure/azure.go +++ b/registry/storage/driver/azure/azure.go @@ -111,6 +111,7 @@ func (d *driver) GetContent(ctx context.Context, path string) ([]byte, error) { return nil, err } + defer blob.Close() return ioutil.ReadAll(blob) }