diff --git a/native/src/init/init.cpp b/native/src/init/init.cpp index 0e4cbf1dc..5ad6620fe 100644 --- a/native/src/init/init.cpp +++ b/native/src/init/init.cpp @@ -21,6 +21,7 @@ bool unxz(out_stream &strm, rust::Slice 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,