diff options
Diffstat (limited to 'gdb/remote-mips.c')
-rw-r--r-- | gdb/remote-mips.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index b46325f..2c8b92e 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -2789,7 +2789,8 @@ mips_load_srec (char *args) buffer = alloca (srec_frame * 2 + 256); - abfd = gdb_bfd_ref (bfd_openr (args, 0)); + abfd = bfd_openr (args, 0); + gdb_bfd_ref (abfd); if (!abfd) { printf_filtered ("Unable to open file %s\n", args); @@ -3376,7 +3377,8 @@ pmon_load_fast (char *file) buffer = (char *) xmalloc (MAXRECSIZE + 1); binbuf = (unsigned char *) xmalloc (BINCHUNK); - abfd = gdb_bfd_ref (bfd_openr (file, 0)); + abfd = bfd_openr (file, 0); + gdb_bfd_ref (abfd); if (!abfd) { printf_filtered ("Unable to open file %s\n", file); |