diff options
author | Tom Tromey <tromey@redhat.com> | 2012-05-29 14:23:40 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-05-29 14:23:40 +0000 |
commit | 6f0c7050fcfb9db9096f2f988f1104eba427bd6c (patch) | |
tree | 676656b0886d01b7ca2a962d9e9bbd344733a28b /gdb/symfile.c | |
parent | ec95993ca4e10b9b3d09f29a8bf48c8da7c7116f (diff) | |
download | gdb-6f0c7050fcfb9db9096f2f988f1104eba427bd6c.zip gdb-6f0c7050fcfb9db9096f2f988f1104eba427bd6c.tar.gz gdb-6f0c7050fcfb9db9096f2f988f1104eba427bd6c.tar.bz2 |
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.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index 416d35d..31da4e4 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1764,7 +1764,6 @@ symfile_bfd_open (char *name) sym_bfd = bfd_fopen (name, gnutarget, FOPEN_RB, desc); if (!sym_bfd) { - close (desc); make_cleanup (xfree, name); error (_("`%s': can't open to read symbols: %s."), name, bfd_errmsg (bfd_get_error ())); |