diff --git a/core/coreapi/unixfs.go b/core/coreapi/unixfs.go index ced5c4727..c700be0d3 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