add missing xz_dec_end

This commit is contained in:
LoveSy 2024-04-26 20:27:24 +08:00 committed by John Wu
parent 33b7b8b297
commit 4dc1c59040

View File

@ -21,6 +21,7 @@ bool unxz(out_stream &strm, rust::Slice<const uint8_t> bytes) {
xz_crc32_init();
size_t size = bytes.size();
struct xz_dec *dec = xz_dec_init(XZ_DYNALLOC, 1 << 26);
run_finally finally([&] { xz_dec_end(dec); });
struct xz_buf b = {
.in = bytes.data(),
.in_pos = 0,