libbfd: make sure variables are initialized before using them.

Initialize l_sec_contents to make sure that free(l_sec_contents) is called
on valid pointers.

Obtained from:	OpenBSD (partial CVS rev 1.18)
MFC after:	5 days
This commit is contained in:
Pedro F. Giffuni 2016-12-16 00:35:59 +00:00
parent d90714d2c5
commit 6e183b4b25
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=310132

View File

@ -11487,7 +11487,7 @@ _bfd_elf_section_already_linked (bfd *abfd, struct bfd_section *sec,
abfd, sec);
else if (sec->size != 0)
{
bfd_byte *sec_contents, *l_sec_contents;
bfd_byte *sec_contents, *l_sec_contents = NULL;
if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents))
(*_bfd_error_handler)