From e9e32f8ac672420e2e5a8c7de260471dbea909a3 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 4 Nov 2019 18:05:30 +0000 Subject: [PATCH] fix(coreapi/add): close the fake repo used when adding with hash-only fixes #6744 --- core/coreapi/unixfs.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/coreapi/unixfs.go b/core/coreapi/unixfs.go index 00bc26c9a..9bf16ec0e 100644 --- a/core/coreapi/unixfs.go +++ b/core/coreapi/unixfs.go @@ -69,6 +69,7 @@ func (api *UnixfsAPI) Add(ctx context.Context, files files.Node, opts ...options if err != nil { return nil, err } + defer nilnode.Close() addblockstore = nilnode.Blockstore exch = nilnode.Exchange pinning = nilnode.Pinning