INFO.FILE_SYMTABS.
(find_linespec_symbols): Add cleanup to free CLASSES.
* symfile.c (find_separate_debug_file_by_debuglink): Add
cleanup to free DEBUGLINK.
* ui-out.c (clear_header_list): No need to check if
HEADER_NEXT.COLHDR is NULL.
Free HEADER_NEXT.COL_NAME.
+2012-05-31 Keith Seitz <keiths@redhat.com>
+
+ * linespec.c (decode_objc): Add cleanup to free
+ INFO.FILE_SYMTABS.
+ (find_linespec_symbols): Add cleanup to free CLASSES.
+ * symfile.c (find_separate_debug_file_by_debuglink): Add
+ cleanup to free DEBUGLINK.
+ * ui-out.c (clear_header_list): No need to check if
+ HEADER_NEXT.COLHDR is NULL.
+ Free HEADER_NEXT.COL_NAME.
+
2012-05-31 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* ada-lang.c (standard_lookup): Prevent uninitialized variable
info.state = self;
info.file_symtabs = NULL;
VEC_safe_push (symtab_p, info.file_symtabs, NULL);
+ make_cleanup (VEC_cleanup (symtab_p), &info.file_symtabs);
info.result.symbols = NULL;
info.result.minimal_symbols = NULL;
values.nelts = 0;
/* Find a list of classes named KLASS. */
classes = lookup_prefix_sym (state, file_symtabs, klass);
+ make_cleanup (VEC_cleanup (symbolp), &classes);
if (!VEC_empty (symbolp, classes))
{
/* Now locate a list of suitable methods named METHOD. */
return NULL;
}
+ cleanups = make_cleanup (xfree, debuglink);
dir = xstrdup (objfile->name);
- cleanups = make_cleanup (xfree, dir);
+ make_cleanup (xfree, dir);
terminate_after_last_dir_separator (dir);
canon_dir = lrealpath (dir);
{
uiout->table.header_next = uiout->table.header_first;
uiout->table.header_first = uiout->table.header_first->next;
- if (uiout->table.header_next->colhdr != NULL)
- xfree (uiout->table.header_next->colhdr);
+ xfree (uiout->table.header_next->colhdr);
+ xfree (uiout->table.header_next->col_name);
xfree (uiout->table.header_next);
}
gdb_assert (uiout->table.header_first == NULL);