mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-25 16:57:52 +00:00
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:
@@ -380,8 +380,6 @@ solib_bfd_fopen (char *pathname, int fd)
|
||||
|
||||
if (abfd)
|
||||
bfd_set_cacheable (abfd, 1);
|
||||
else if (fd != -1)
|
||||
close (fd);
|
||||
}
|
||||
|
||||
if (!abfd)
|
||||
|
||||
Reference in New Issue
Block a user