1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02: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.
This commit is contained in:
Lasse Collin 2011-10-23 17:08:14 +03:00
parent 6b620a0f08
commit ab50ae3ef4

View file

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