]> granicus.if.org Git - xz/commit
liblzma: Fix a memory leak in error path of lzma_index_dup().
authorLasse Collin <lasse.collin@tukaani.org>
Mon, 12 Oct 2015 17:29:09 +0000 (20:29 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Mon, 26 Dec 2016 15:57:51 +0000 (17:57 +0200)
commitd74377e62b4c649e40294dd441de72c0f092e67c
tree5165f7ed82c8ab6c39e46928d49992a4cdcb7ff2
parentf580732216dcf971f3f006fe8e01cd4979e1d964
liblzma: Fix a memory leak in error path of lzma_index_dup().

lzma_index_dup() calls index_dup_stream() which, in case of
an error, calls index_stream_end() to free memory allocated
by index_stream_init(). However, it illogically didn't
actually free the memory. To make it logical, the tree
handling code was modified a bit in addition to changing
index_stream_end().

Thanks to Evan Nemerson for the bug report.
src/liblzma/common/index.c