First, output_thread_groups leaks a cleanup along one return path.
Second, parse_cmd_to_aexpr could return without running its cleanups,
if there was an exception in a TRY_CATCH.
* breakpoint.c (output_thread_groups, parse_cmd_to_aexpr): Call
do_cleanups earlier.
+2013-05-30 Tom Tromey <tromey@redhat.com>
+
+ * breakpoint.c (output_thread_groups, parse_cmd_to_aexpr): Call
+ do_cleanups earlier.
+
2013-05-30 Tom Tromey <tromey@redhat.com>
* machoread.c (macho_symfile_read): Assign first cleanup to
fpieces, nargs, argvec);
}
+ do_cleanups (old_cleanups);
+
if (ex.reason < 0)
{
/* If we got here, it means the command could not be parsed to a valid
return NULL;
}
- do_cleanups (old_cleanups);
-
/* We have a valid agent expression, return it. */
return aexpr;
}
VEC(int) *inf_num,
int mi_only)
{
- struct cleanup *back_to = make_cleanup_ui_out_list_begin_end (uiout,
- field_name);
+ struct cleanup *back_to;
int is_mi = ui_out_is_mi_like_p (uiout);
int inf;
int i;
if (!is_mi && mi_only)
return;
+ back_to = make_cleanup_ui_out_list_begin_end (uiout, field_name);
+
for (i = 0; VEC_iterate (int, inf_num, i, inf); ++i)
{
if (is_mi)