fix list_available_thread_groups

list_available_thread_groups, in mi-main.c, leaks a cleanup.
This changes it to call do_cleanups.

	* mi/mi-main.c (list_available_thread_groups): Call do_cleanups.
This commit is contained in:
Tom Tromey 2013-05-30 17:04:47 +00:00
parent 25f4350049
commit b963592585
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2013-05-30 Tom Tromey <tromey@redhat.com>
* mi/mi-main.c (list_available_thread_groups): Call do_cleanups.
2013-05-30 Tom Tromey <tromey@redhat.com>
* inf-ptrace.c (inf_ptrace_create_inferior): Unconditionally

View File

@ -681,6 +681,7 @@ list_available_thread_groups (VEC (int) *ids, int recurse)
struct osdata_item *item;
int ix_items;
struct ui_out *uiout = current_uiout;
struct cleanup *cleanup;
/* This keeps a map from integer (pid) to VEC (struct osdata_item *)*
The vector contains information about all threads for the given pid.
@ -690,7 +691,7 @@ list_available_thread_groups (VEC (int) *ids, int recurse)
/* get_osdata will throw if it cannot return data. */
data = get_osdata ("processes");
make_cleanup_osdata_free (data);
cleanup = make_cleanup_osdata_free (data);
if (recurse)
{
@ -793,6 +794,8 @@ list_available_thread_groups (VEC (int) *ids, int recurse)
do_cleanups (back_to);
}
do_cleanups (cleanup);
}
void