aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-03-30 15:06:51 +0000
committerNick Clifton <nickc@redhat.com>2011-03-30 15:06:51 +0000
commitf956bf33e2a0613ab9e243d30dfb8cc6ccb1fe9b (patch)
tree4bc5dc911b8cf7b01cb6269bf19c28c4a6ce8477
parentc734e7e3836935c1dab4e13e79b250bcd044a7fa (diff)
downloadgdb-f956bf33e2a0613ab9e243d30dfb8cc6ccb1fe9b.zip
gdb-f956bf33e2a0613ab9e243d30dfb8cc6ccb1fe9b.tar.gz
gdb-f956bf33e2a0613ab9e243d30dfb8cc6ccb1fe9b.tar.bz2
* obj-elf.c (obj_elf_section): Free malloced name.
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/config/obj-elf.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 084f7ed..498c3f3 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+2011-03-30 Michael Snyder <msnyder@vmware.com>
+
+ * obj-elf.c (obj_elf_section): Free malloced name.
+
2011-03-30 Tristan Gingold <gingold@adacore.com>
* config/tc-ppc.c (ppc_frob_symbol): Convert stsym symbols value
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index afb4811..30eb816 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -984,6 +984,7 @@ obj_elf_section (int push)
if (beg == NULL)
{
ignore_rest_of_line ();
+ xfree (name);
return;
}
attr |= obj_elf_parse_section_letters (beg, strlen (beg), &clone);
@@ -1003,6 +1004,7 @@ obj_elf_section (int push)
if (beg == NULL)
{
ignore_rest_of_line ();
+ xfree (name);
return;
}
type = obj_elf_section_type (beg, strlen (beg), TRUE);
@@ -1084,6 +1086,7 @@ obj_elf_section (int push)
{
as_bad (_("character following name is not '#'"));
ignore_rest_of_line ();
+ xfree (name);
return;
}
beg = ++input_line_pointer;