* 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:
Tom Tromey 2012-05-29 14:23:40 +00:00
parent ec95993ca4
commit 6f0c7050fc
7 changed files with 31 additions and 7 deletions

View file

@ -6957,7 +6957,6 @@ try_open_dwo_file (const char *file_name)
sym_bfd = bfd_fopen (absolute_name, gnutarget, FOPEN_RB, desc);
if (!sym_bfd)
{
close (desc);
xfree (absolute_name);
return NULL;
}