]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Close resource leaks in the BFD library's plugin handler.
authorNick Clifton <nickc@redhat.com>
Wed, 1 Aug 2018 13:34:41 +0000 (14:34 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 1 Aug 2018 13:34:41 +0000 (14:34 +0100)
commit103da91bc083f94769e3758175a96d06cef1f8fe
tree781c4671d0055eca0dd72af38b23e228d0d70e90
parent50320b1d4a1dd06db70aeea485e0ffd9871548e0
Close resource leaks in the BFD library's plugin handler.

PR 23460
* plugin.c (bfd_plugin_open_input): Close file descriptor if the
call to fstat fails.
(try_claim): Always close the file descriptor at the end of the
function.
(try_load_plugin): If a plugin has already been registered, then
skip the dlopen and onload steps and go straight to claiming the
file.  If these is an error, close the plugin.
bfd/ChangeLog
bfd/plugin.c