2011-03-01 Michael Snyder * bfd-target.c (target_bfd_reopen): Check for failure. Index: bfd-target.c =================================================================== RCS file: /cvs/src/src/gdb/bfd-target.c,v retrieving revision 1.17 diff -u -p -u -p -r1.17 bfd-target.c --- bfd-target.c 1 Jan 2011 15:32:57 -0000 1.17 +++ bfd-target.c 2 Mar 2011 01:00:25 -0000 @@ -85,7 +85,13 @@ target_bfd_reopen (struct bfd *bfd) data = XZALLOC (struct target_bfd_data); data->bfd = bfd; - build_section_table (bfd, &data->table.sections, &data->table.sections_end); + if (build_section_table (bfd, &data->table.sections, + &data->table.sections_end)) + { + xfree (data); + error (_("Failed to re-open '%s': %s"), + bfd_get_filename (bfd), bfd_errmsg (bfd_get_error ())); + } t = XZALLOC (struct target_ops); t->to_shortname = "bfd";