aboutsummaryrefslogtreecommitdiff
path: root/gdb/m32r-rom.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/m32r-rom.c')
-rw-r--r--gdb/m32r-rom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c
index 9dbcd26..ffda6f9 100644
--- a/gdb/m32r-rom.c
+++ b/gdb/m32r-rom.c
@@ -133,7 +133,7 @@ m32r_load (char *filename, int from_tty)
abfd = gdb_bfd_ref (bfd_openr (filename, 0));
if (!abfd)
error (_("Unable to open file %s."), filename);
- cleanup = make_cleanup_bfd_close (abfd);
+ cleanup = make_cleanup_bfd_unref (abfd);
if (bfd_check_format (abfd, bfd_object) == 0)
error (_("File is not an object file."));
gettimeofday (&start_time, NULL);
@@ -530,7 +530,7 @@ m32r_upload_command (char *args, int from_tty)
gettimeofday (&end_time, NULL);
abfd = gdb_bfd_ref (bfd_openr (args, 0));
- cleanup = make_cleanup_bfd_close (abfd);
+ cleanup = make_cleanup_bfd_unref (abfd);
if (abfd != NULL)
{ /* Download is done -- print section statistics. */
if (bfd_check_format (abfd, bfd_object) == 0)