This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Use bfd_alloc for compressed section contents
- From: sergiodj+buildbot at redhat dot com
- To: gdb-testers at sourceware dot org
- Date: Fri, 10 Apr 2015 11:19:46 -0400
- Subject: [binutils-gdb] Use bfd_alloc for compressed section contents
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 030aeb759908d7bcf1b87f3599bfa482a90ab6c1 ***
Author: H.J. Lu <hjl.tools@gmail.com>
Branch: master
Commit: 030aeb759908d7bcf1b87f3599bfa482a90ab6c1
Use bfd_alloc for compressed section contents
Compressed section contents should be bfd_alloced to avoid memory leak.
This patch replaces bfd_malloc and free with bfd_alloc and bfd_release
on compressed buffer in bfd_compress_section_contents. There is still
a very small memory leak when compressed section isn't smaller.
* compress.c (bfd_compress_section_contents): Replace bfd_malloc
and free with bfd_alloc and bfd_release on compressed buffer.
Release buffer if compressed section isn't smaller.