diff options
author | pfg <pfg@FreeBSD.org> | 2016-12-21 15:39:16 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-12-21 15:39:16 +0000 |
commit | 11cb910ccfaac9658a713086da2079289e0b4f36 (patch) | |
tree | 6c8be4aa197e897027bb55e12068a8ae439a0891 /contrib | |
parent | 0710dc1d383c69020a3486e95cc29539f597f5cb (diff) | |
download | FreeBSD-src-11cb910ccfaac9658a713086da2079289e0b4f36.zip FreeBSD-src-11cb910ccfaac9658a713086da2079289e0b4f36.tar.gz |
MFC r310132:
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)
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/binutils/bfd/elflink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/binutils/bfd/elflink.c b/contrib/binutils/bfd/elflink.c index f1e50de..10d987c 100644 --- a/contrib/binutils/bfd/elflink.c +++ b/contrib/binutils/bfd/elflink.c @@ -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) |