From: Michael Snyder Date: Mon, 14 Mar 2011 19:05:39 +0000 (+0000) Subject: 2011-03-08 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c30fe01daf7e4b8d1a82b9ea2137f30e20980c70;p=binutils-gdb.git 2011-03-08 Michael Snyder * wrstabs.c (stab_start_struct_type): Close memory leak. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2ec667f0897..51720262081 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,7 @@ 2011-03-14 Michael Snyder + * 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 0ca861ce8d8..bbf257e5f5d 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) {