Close fd only if fd != -1
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 6 Feb 2015 00:57:09 +0000 (16:57 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 6 Feb 2015 00:57:09 +0000 (16:57 -0800)
commit119d62ffb87b8e6fc24d1cfa040586ec94f5655a
tree64fca5075f9b92824cfcc8b0561fa522bee9b087
parent8e2470d34f4306cc3a21fdcd8099443896a61313
Close fd only if fd != -1

This patch closes fd only if fd != -1.

* plugin.c (release_input_file): Set fd to -1 after closing it.
(plugin_maybe_claim): Close fd only if fd != -1.
ld/ChangeLog
ld/plugin.c