1
0
镜像自地址 https://git.tukaani.org/xz.git 已同步 2025-07-06 12:26:39 +00:00

liblzma: Fix invalid free() in the threaded encoder.

It was triggered if initialization failed e.g. due to
running out of memory.

Thanks to Arkadiusz Miskiewicz.
这个提交包含在:
Lasse Collin 2011-10-23 17:08:14 +03:00
父节点 6b620a0f08
当前提交 ab50ae3ef4

查看文件

@ -101,7 +101,11 @@ extern void
lzma_outq_end(lzma_outq *outq, lzma_allocator *allocator) lzma_outq_end(lzma_outq *outq, lzma_allocator *allocator)
{ {
lzma_free(outq->bufs, allocator); lzma_free(outq->bufs, allocator);
outq->bufs = NULL;
lzma_free(outq->bufs_mem, allocator); lzma_free(outq->bufs_mem, allocator);
outq->bufs_mem = NULL;
return; return;
} }