forked from Imagelibrary/binutils-gdb
bfd/
* opncls.c (bfd_fopen): Always close fd on failure. (bfd_fdopenr): Likewise. gdb/ * symfile.c (symfile_bfd_open): Don't close desc if bfd_fopen fails. * solib.c (solib_bfd_fopen): Don't close fd if bfd_fopen fails. * exec.c (exec_file_attach): Don't close scratch_chan if bfd_fopen fails. * dwarf2read.c (try_open_dwo_file): Don't close fd if bfd_fopen fails.
This commit is contained in:
@@ -238,7 +238,6 @@ exec_file_attach (char *filename, int from_tty)
|
||||
|
||||
if (!exec_bfd)
|
||||
{
|
||||
close (scratch_chan);
|
||||
error (_("\"%s\": could not open as an executable file: %s"),
|
||||
scratch_pathname, bfd_errmsg (bfd_get_error ()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user