fix(coreapi/add): close the fake repo used when adding with hash-only

fixes #6744
This commit is contained in:
Steven Allen 2019-11-04 18:05:30 +00:00
parent 6ded0ba0f8
commit 745708b85e

View File

@ -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