mirror of https://git.tukaani.org/xz.git
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.
This commit is contained in:
parent
6b620a0f08
commit
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue