aboutsummaryrefslogtreecommitdiff
path: root/binutils/wrstabs.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-03-14 19:05:39 +0000
committerMichael Snyder <msnyder@vmware.com>2011-03-14 19:05:39 +0000
commitc30fe01daf7e4b8d1a82b9ea2137f30e20980c70 (patch)
treea42a75c19527f0b56d64bf5b3d1a6fdff3e85832 /binutils/wrstabs.c
parent824446ad103a6065c709fbb539ff279daa8fe774 (diff)
downloadgdb-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/wrstabs.c')
-rw-r--r--binutils/wrstabs.c4
1 files changed, 1 insertions, 3 deletions
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)
{