fix(coreapi/add): close the fake repo used when adding with hash-only
fixes #6744
Steven Allen committed
Nov 4, 2019 at 18:05 UTC
e9e32f8ac672420e2e5a8c7de260471dbea909a3
1 file changed
+1
core/coreapi/unixfs.go
+1
@@ -69,6 +69,7 @@ func (api *UnixfsAPI) Add(ctx context.Context, files files.Node, opts ...options
69
if err != nil {
70
return nil, err
71
}
72
+ defer nilnode.Close()
73
addblockstore = nilnode.Blockstore
74
exch = nilnode.Exchange
75
pinning = nilnode.Pinning