In elf.c, do not increment `s' before it is initialized. At the time
of the increment, `s' is otherwise unused anyway.
In elflink.c, initialize sec_contents and l_sec_contents to make
sure that the free(sec_contents) and free(l_sec_contents) are called
on valid pointers.
ok jca@ guenther@
count = relplt->size / hdr->sh_entsize;
size = count * sizeof (asymbol);
p = relplt->relocation;
- for (i = 0; i < count; i++, s++, p++)
+ for (i = 0; i < count; i++, p++)
size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt");
s = *ret = bfd_malloc (size);
abfd, sec);
else if (sec->size != 0)
{
- bfd_byte *sec_contents, *l_sec_contents;
+ bfd_byte *sec_contents = NULL, *l_sec_contents = NULL;
if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents))
(*_bfd_error_handler)