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:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user