diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-04-10 03:54:41 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-04-10 03:54:41 -0700 |
commit | 030aeb759908d7bcf1b87f3599bfa482a90ab6c1 (patch) | |
tree | bdd89dc7555aeaa5b5d18e43356918b2ac5d9bb7 /bfd/ChangeLog | |
parent | 8f572e5c0f71fd6641768985855b2e0955a78f51 (diff) | |
download | gdb-030aeb759908d7bcf1b87f3599bfa482a90ab6c1.zip gdb-030aeb759908d7bcf1b87f3599bfa482a90ab6c1.tar.gz gdb-030aeb759908d7bcf1b87f3599bfa482a90ab6c1.tar.bz2 |
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.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f50ae75..10a3ae2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2015-04-10 H.J. Lu <hongjiu.lu@intel.com> + + * 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. + 2015-04-10 Alan Modra <amodra@gmail.com> PR ld/18222 |