This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Ping [Patch]: som.c: do not free relocations
- From: Tristan Gingold <gingold at adacore dot com>
- To: binutils <binutils at sourceware dot org>
- Date: Mon, 7 Jun 2010 16:14:53 +0200
- Subject: Ping [Patch]: som.c: do not free relocations
- References: <81082147-8000-4BCC-8400-EEA594C4A3A6@adacore.com>
Hi,
ping for the whole SOM patch set.
Tristan.
On May 28, 2010, at 10:30 AM, Tristan Gingold wrote:
> Hi,
>
> there is a subtile bug in som.c:som_bfd_free_cached_info: relocations were freed, which is
> wrong as they are allocated in som_slurp_reloc_table using bfd_zalloc.
>
> Ok to commit ?
>
> Tristan.
>
> bfd/
> 2010-05-28 Tristan Gingold <gingold@adacore.com>
>
> * som.c (som_bfd_free_cached_info): Do not free relocations as
> they were allocated with bfd_zalloc.
>
>
>
> index fbdc2b4..c793cb9 100644
> --- a/bfd/som.c
> +++ b/bfd/som.c
> @@ -6304,8 +6304,7 @@ som_bfd_free_cached_info (bfd *abfd)
> /* Free the native relocations. */
> o->reloc_count = (unsigned) -1;
> FREE (som_section_data (o)->reloc_stream);
> - /* Free the generic relocations. */
> - FREE (o->relocation);
> + /* Do not free the generic relocations as they are objalloc'ed. */
> }
> #undef FREE
>