libdw: Initialize filelist earlier in dwarf_getsrclines.c read_srclines.
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Sun, 17 Jun 2018 09:34:08 +0000 (11:34 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 18 Jun 2018 11:28:48 +0000 (13:28 +0200)
commit9e16a100bf8e0d43415253fe8cfd3ba1d8e637d1
treee5d9d199775a34862b2767cebc350935ba612c86
parent62aed3f99ce6229a7bf6b1a6e66c49d9e676680f
libdw: Initialize filelist earlier in dwarf_getsrclines.c read_srclines.

I'm getting this error with 0.172:

dwarf_getsrclines.c: In function 'read_srclines':
dwarf_getsrclines.c:1074:7: error: 'filelist' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       free (filelist);
       ^~~~~~~~~~~~~~~

It seems that gcc is right here as there is "ifs" that go to "out"
(where filelist is freed) before freelist is initialized.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
libdw/ChangeLog
libdw/dwarf_getsrclines.c