Skip to content

Commit

Permalink
Replace iterative dealloc with dwarf_srclines_dealloc, which should a…
Browse files Browse the repository at this point in the history
…void certain leaks that were inherent in the iterative style.
  • Loading branch information
wrwilliams committed Jul 12, 2016
1 parent 972e08f commit 8731c2b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions symtabAPI/src/Object-elf.C
Original file line number Diff line number Diff line change
Expand Up @@ -4443,10 +4443,7 @@ void Object::parseLineInfoForCU(Dwarf_Die cuDIE, LineInformation* li_for_module)
} /* end iteration over source line entries. */

/* Free this CU's source lines. */
for ( int i = 0; i < lineCount; i++ ) {
dwarf_dealloc( dbg, lineBuffer[i], DW_DLA_LINE );
}
dwarf_dealloc( dbg, lineBuffer, DW_DLA_LIST );
dwarf_srclines_dealloc(dbg, lineBuffer, lineCount);
}


Expand Down

0 comments on commit 8731c2b

Please sign in to comment.