+2011-05-11 Thiago Jung Bauermann <bauerman@br.ibm.com>
+
+ * symtab.c (lookup_symtab): Run cleanup before returning.
+
2011-05-11 Tom Tromey <tromey@redhat.com>
* dwarf2read.c (handle_data_member_location): New function.
struct objfile *objfile;
char *real_path = NULL;
char *full_path = NULL;
+ struct cleanup *cleanup;
+
+ cleanup = make_cleanup (null_cleanup, NULL);
/* Here we are interested in canonicalizing an absolute path, not
absolutizing a relative path. */
{
if (FILENAME_CMP (name, s->filename) == 0)
{
+ do_cleanups (cleanup);
return s;
}
if (fp != NULL && FILENAME_CMP (full_path, fp) == 0)
{
+ do_cleanups (cleanup);
return s;
}
}
make_cleanup (xfree, rp);
if (FILENAME_CMP (real_path, rp) == 0)
{
+ do_cleanups (cleanup);
return s;
}
}
ALL_SYMTABS (objfile, s)
{
if (FILENAME_CMP (lbasename (s->filename), name) == 0)
- return s;
+ {
+ do_cleanups (cleanup);
+ return s;
+ }
}
/* Same search rules as above apply here, but now we look thru the
}
if (s != NULL)
- return s;
+ {
+ do_cleanups (cleanup);
+ return s;
+ }
if (!found)
- return NULL;
+ {
+ do_cleanups (cleanup);
+ return NULL;
+ }
/* At this point, we have located the psymtab for this file, but
the conversion to a symtab has failed. This usually happens