liblzma: Fix another invalid free() after memory allocation failure.
commitcb05dbcf8b868441ec805016222f3fd77f1c5caa
authorLasse Collin <lasse.collin@tukaani.org>
Wed, 23 Nov 2022 23:26:37 +0000 (24 01:26 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Wed, 23 Nov 2022 23:26:37 +0000 (24 01:26 +0200)
tree87b64b46dd1abd6221d01ee18ec7d803e0ea3d4f
parent75f1a6c26df4ce329da0882786403e3ccf5cd898
liblzma: Fix another invalid free() after memory allocation failure.

This time it can happen when lzma_stream_encoder_mt() is used
to reinitialize an existing multi-threaded Stream encoder
and one of 1-4 tiny allocations in lzma_filters_copy() fail.

It's very similar to the previous bug
10430fbf3820dafd4eafd38ec8be161a6978ed2b, happening with
an array of lzma_filter structures whose old options are freed
but the replacement never arrives due to a memory allocation
failure in lzma_filters_copy().
src/liblzma/common/stream_encoder_mt.c