+2013-05-30 Tom Tromey <tromey@redhat.com>
+
+ * somread.c (som_symtab_read): Call do_cleanups.
+
2013-05-30 Tom Tromey <tromey@redhat.com>
* printcmd.c (print_command_1): Unconditionally call do_cleanups.
som_symtab_read (bfd *abfd, struct objfile *objfile,
struct section_offsets *section_offsets)
{
+ struct cleanup *cleanup;
struct gdbarch *gdbarch = get_objfile_arch (objfile);
unsigned int number_of_symbols;
int val, dynamic;
We avoid using alloca because the memory size could be so large
that we could hit the stack size limit. */
buf = xmalloc (symsize * number_of_symbols);
- make_cleanup (xfree, buf);
+ cleanup = make_cleanup (xfree, buf);
bfd_seek (abfd, obj_som_sym_filepos (abfd), SEEK_SET);
val = bfd_bread (buf, symsize * number_of_symbols, abfd);
if (val != symsize * number_of_symbols)
section),
objfile);
}
+
+ do_cleanups (cleanup);
}
/* Scan and build partial symbols for a symbol file.