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
1 changed files with 4 additions and 0 deletions

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;
}