diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-03-14 19:05:39 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-03-14 19:05:39 +0000 |
commit | c30fe01daf7e4b8d1a82b9ea2137f30e20980c70 (patch) | |
tree | a42a75c19527f0b56d64bf5b3d1a6fdff3e85832 /binutils | |
parent | 824446ad103a6065c709fbb539ff279daa8fe774 (diff) | |
download | gdb-c30fe01daf7e4b8d1a82b9ea2137f30e20980c70.zip gdb-c30fe01daf7e4b8d1a82b9ea2137f30e20980c70.tar.gz gdb-c30fe01daf7e4b8d1a82b9ea2137f30e20980c70.tar.bz2 |
2011-03-08 Michael Snyder <msnyder@vmware.com>
* wrstabs.c (stab_start_struct_type): Close memory leak.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 2 | ||||
-rw-r--r-- | binutils/wrstabs.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2ec667f..5172026 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,7 @@ 2011-03-14 Michael Snyder <msnyder@vmware.com> + * wrstabs.c (stab_start_struct_type): Close memory leak. + * readelf.c (process_version_sections): Free symbols. * nm.c (display_rel_file): Free symsizes. diff --git a/binutils/wrstabs.c b/binutils/wrstabs.c index 0ca861c..bbf257e 100644 --- a/binutils/wrstabs.c +++ b/binutils/wrstabs.c @@ -1312,9 +1312,7 @@ stab_start_struct_type (void *p, const char *tag, unsigned int id, struct stab_write_handle *info = (struct stab_write_handle *) p; long tindex; bfd_boolean definition; - char *buf; - - buf = (char *) xmalloc (40); + char buf[40]; if (id == 0) { |