This is the mail archive of the
mailing list for the binutils project.
[1/20] MIPS GOT: Fix an invalid free
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 11 Feb 2013 17:23:11 +0000
- Subject: [1/20] MIPS GOT: Fix an invalid free
- References: <firstname.lastname@example.org>
mips_got_entries are allocated by bfd_alloc, so shouldn't be freed.
I hit this during the first attempt at some of the later patches.
I applied this one to the 2.23 branch too.
* elfxx-mips.c (mips_elf_recreate_got): Remove free.
(mips_elf_resolve_final_got_entries): Remove bogus comment.
--- bfd/elfxx-mips.c 2013-02-11 14:06:20.528069474 +0000
+++ bfd/elfxx-mips.c 2013-02-11 14:06:30.264141655 +0000
@@ -4002,8 +4002,6 @@ mips_elf_recreate_got (void **entryp, vo
if (*slot == NULL)
*slot = entry;
- free (entry);
@@ -4027,8 +4025,6 @@ mips_elf_resolve_final_got_entries (stru
if (new_got == NULL)
- /* Each entry in g->got_entries has either been copied to new_got
- or freed. Now delete the hash table itself. */
g->got_entries = new_got;