commit | 6d872a1a807dc3f347808e853111dec7770ee0a9 | [log] [tgz] |
---|---|---|
author | Alan Modra <amodra@gmail.com> | Fri Jul 14 10:47:30 2023 +0930 |
committer | Alan Modra <amodra@gmail.com> | Fri Jul 14 11:53:48 2023 +0930 |
tree | 6afe7f57e29782ff440a57bceb630074bc6ecb14 | |
parent | 478409b71d3e80647904540e518897667bd352b2 [diff] |
More tidies to objcopy archive handling This makes sure copy_archive exits with ibfd and obfd closed. Error paths didn't do that, leading to memory leaks. None of this matters very much. * objcopy.c (copy_archive): bfd_close ibfd and obfd on error return paths. Remove braces around "list" free. (copy_file): Don't close invalid file descriptor.