* [RFA/gas] config/obj-elf.c (obj_elf_section): Free malloced name.
@ 2011-03-09 19:56 Michael Snyder
2011-03-30 15:07 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Michael Snyder @ 2011-03-09 19:56 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 26 bytes --]
Plug a memory leak.
OK?
[-- Attachment #2: obj-elf.txt --]
[-- Type: text/plain, Size: 1034 bytes --]
2011-03-09 Michael Snyder <msnyder@vmware.com>
* obj-elf.c (obj_elf_section): Free malloced name.
Index: obj-elf.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-elf.c,v
retrieving revision 1.138
diff -u -p -r1.138 obj-elf.c
--- obj-elf.c 6 Mar 2011 14:05:24 -0000 1.138
+++ obj-elf.c 9 Mar 2011 19:51:44 -0000
@@ -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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFA/gas] config/obj-elf.c (obj_elf_section): Free malloced name.
2011-03-09 19:56 [RFA/gas] config/obj-elf.c (obj_elf_section): Free malloced name Michael Snyder
@ 2011-03-30 15:07 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2011-03-30 15:07 UTC (permalink / raw)
To: binutils
> 2011-03-09 Michael Snyder<msnyder@vmware.com>
>
> * obj-elf.c (obj_elf_section): Free malloced name.
Approved and applied.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-30 15:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-09 19:56 [RFA/gas] config/obj-elf.c (obj_elf_section): Free malloced name Michael Snyder
2011-03-30 15:07 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).