if (filename == NULL || filename[0] == 0)
filename = get_exec_file (1);
- abfd = gdb_bfd_ref (bfd_openr (filename, 0));
+ abfd = bfd_openr (filename, 0);
+ gdb_bfd_ref (abfd);
if (!abfd)
error (_("Unable to open file %s."), filename);
cleanup = make_cleanup_bfd_unref (abfd);
printf_filtered (" -- Ethernet load complete.\n");
gettimeofday (&end_time, NULL);
- abfd = gdb_bfd_ref (bfd_openr (args, 0));
+ abfd = bfd_openr (args, 0);
+ gdb_bfd_ref (abfd);
cleanup = make_cleanup_bfd_unref (abfd);
if (abfd != NULL)
{ /* Download is done -- print section statistics. */