Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The main one here is the section buffer, which can be quite large. By using alloc rather than malloc we can leave tidying memory to the generic bfd code when the bfd is closed. bfd_check_format also releases memory when object_p fails, so while it wouldn't be wrong to bfd_release at bad_format_free in mmo_object_p, it's a little extra code and work for no gain. * mmo.c (mmo_object_p): bfd_alloc rather than bfd_malloc lop_stab_symbol. Don't free/release on error. (mmo_get_spec_section): bfd_zalloc rather than bfd_zmalloc section buffer. (mmo_scan): Free fname on another error path.
- Loading branch information