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
745708b85ec8977f17b88fedfb30ce181bb53ff7
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