Merge pull request #6747 from ipfs/fix/only-hash-leak

fix(coreapi/add): close the fake repo used when adding with hash-only
This commit is contained in:
Steven Allen 2019-11-08 10:30:59 +00:00 committed by GitHub
commit ec748a7b5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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