This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Use bfd_alloc for compressed section contents


*** 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]