diff options
author | Tom Tromey <tromey@redhat.com> | 2013-05-30 17:04:47 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-05-30 17:04:47 +0000 |
commit | b963592585c05fcfd6817584a9f4e10d038c043a (patch) | |
tree | 0eff8dbc48af2b91f02a1808ee34e6d26d73b3cc /gdb/mi | |
parent | 25f435004904ce1dce520d7dcc40eb9b623e244e (diff) | |
download | gdb-b963592585c05fcfd6817584a9f4e10d038c043a.zip gdb-b963592585c05fcfd6817584a9f4e10d038c043a.tar.gz gdb-b963592585c05fcfd6817584a9f4e10d038c043a.tar.bz2 |
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.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 9428e8c..f69cd8d 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -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 |