DwarfReader: fix premature fd close

When Richard decided we need not yet give up when dwarf_srclines()
fails, he left a -- now premature -- close(fd) behind.  Found by
Coverity Scan, CID 25806.

Change-Id: I0bc0cb6796225c9efaf5290e2799b6814f88e5b4
This commit is contained in:
Horst Schirmeier
2015-02-07 15:58:23 +01:00
parent 0e305034e9
commit a19eb6db74

View File

@ -232,8 +232,13 @@ bool DwarfReader::read_mapping(std::string fileName, std::list<DwarfLineMapping>
Dwarf_Line* lineBuffer;
Dwarf_Signed lineCount;
if (dwarf_srclines(die,&lineBuffer,&lineCount,0)!=DW_DLV_OK) {
#if 0
close(fd);
continue; //return false;
return false;
#else
// Richard decided this case is OK
continue;
#endif
}
// Store them