diff --git a/internal/zstd/reader.go b/internal/zstd/reader.go index 20630a3..cd57a56 100644 --- a/internal/zstd/reader.go +++ b/internal/zstd/reader.go @@ -34,6 +34,7 @@ func NewReader(_ []byte, reader io.Reader) (io.ReadCloser, error) { if r, err = zstd.NewReader(reader); err != nil { return nil, err } + runtime.SetFinalizer(r, (*zstd.Decoder).Close) }