Make sure variables are initialized before using them
authorstefan <stefan@openbsd.org>
Mon, 1 Aug 2016 16:40:09 +0000 (16:40 +0000)
committerstefan <stefan@openbsd.org>
Mon, 1 Aug 2016 16:40:09 +0000 (16:40 +0000)
commit52e389ba0d1de9131f6be288cfaf9b28a0b732e5
treecf97ac53abb1919a114bea93d5d9581a73f2b35d
parent419a1970a57e08252234496f2b12827e24417a6e
Make sure variables are initialized before using them

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@
gnu/usr.bin/binutils-2.17/bfd/elf.c
gnu/usr.bin/binutils-2.17/bfd/elflink.c