]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libelf: Fix double free in __libelf_compress on error path.
authorMark Wielaard <mark@klomp.org>
Fri, 24 Apr 2020 23:21:12 +0000 (01:21 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 24 Apr 2020 23:26:48 +0000 (01:26 +0200)
commita5d73b3e51afada171da9781089cd0e8fc9f64a6
tree88022e02060f9ae175edd5c51dc6f94201121379
parent554352ded723042572a91200d05fdb075b1a1ea3
libelf: Fix double free in __libelf_compress on error path.

In commit 2092865a7e589ff805caa47e69ac9630f34d4f2a
"libelf: {de,}compress: ensure zlib resource cleanup" we added a
call to deflate_cleanup to make sure all resources were freed.
As GCC10 -fanalyzer points out that could cause a double free
of out_buf. Fix by removing the free (out_buf) in __libelf_compress.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libelf/ChangeLog
libelf/elf_compress.c