mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
Fix a seg-fault in the AVR linker.
* elf32-avr.c (avr_elf32_load_records_from_section): Free internal_relocs only if they aren't cached.
This commit is contained in:

committed by
Nick Clifton

parent
7517e550ce
commit
024ea11b48
@ -1,3 +1,8 @@
|
||||
2016-03-30 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
|
||||
|
||||
* elf32-avr.c (avr_elf32_load_records_from_section): Free
|
||||
internal_relocs only if they aren't cached.
|
||||
|
||||
2016-03-29 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 17334
|
||||
|
@ -4068,11 +4068,13 @@ avr_elf32_load_records_from_section (bfd *abfd, asection *sec)
|
||||
}
|
||||
|
||||
free (contents);
|
||||
free (internal_relocs);
|
||||
if (elf_section_data (sec)->relocs != internal_relocs)
|
||||
free (internal_relocs);
|
||||
return r_list;
|
||||
|
||||
load_failed:
|
||||
free (internal_relocs);
|
||||
if (elf_section_data (sec)->relocs != internal_relocs)
|
||||
free (internal_relocs);
|
||||
free (contents);
|
||||
free (r_list);
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user