Skip to content

Fix the memory leak issue in the lz_codecs.cpp file - #318

Open
wu-zhao-min wants to merge 1 commit into
inikep:masterfrom
wu-zhao-min:master
Open

Fix the memory leak issue in the lz_codecs.cpp file#318
wu-zhao-min wants to merge 1 commit into
inikep:masterfrom
wu-zhao-min:master

Conversation

@wu-zhao-min

Copy link
Copy Markdown
Contributor

Problem description:The lzbench_libdeflate_decompress function in the lz_codecs.cpp file allocates the decompressor using libdeflate_alloc_decompressor(), but it does not call libdeflate_free_decompressor() to release it on either of the two exit paths.
Hazard statement:During the stress testing, each decompression call will leak a decompressor object. Long-term stress testing will significantly consume memory.
Repair solution: Add release calls before both return paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant