Skip to content

Commit e5ad43a

Browse files
committed
fix: free dctx for Zstd.decompress
1 parent 1d401ff commit e5ad43a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/zstdruby/zstdruby.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static VALUE rb_decompress(int argc, VALUE *argv, VALUE self)
141141
if (ZSTD_isError(decompress_size)) {
142142
rb_raise(rb_eRuntimeError, "%s: %s", "decompress error", ZSTD_getErrorName(decompress_size));
143143
}
144-
144+
ZSTD_freeDCtx(dctx);
145145
return output;
146146
}
147147

0 commit comments

Comments
 (0)