aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-02-27 01:54:30 +0000
committerMichael Snyder <msnyder@vmware.com>2011-02-27 01:54:30 +0000
commit86b887dff0266043bf1454b1441bbd28f605c30b (patch)
tree6f459ccd6ec906a74332807bb70bd9b42070fe44 /gdb/breakpoint.c
parent66fd3b1e63d5273421e2df25bc760deb499799af (diff)
downloadgdb-86b887dff0266043bf1454b1441bbd28f605c30b.zip
gdb-86b887dff0266043bf1454b1441bbd28f605c30b.tar.gz
gdb-86b887dff0266043bf1454b1441bbd28f605c30b.tar.bz2
2011-02-26 Michael Snyder <msnyder@vmware.com>
* breakpoint.c (reattach_breakpoints): Avoid resource leak (ui_file).
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 484a831..490084e 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1989,7 +1989,7 @@ reattach_breakpoints (int pid)
struct cleanup *old_chain;
struct bp_location *bl, **blp_tmp;
int val;
- struct ui_file *tmp_error_stream = mem_fileopen ();
+ struct ui_file *tmp_error_stream;
int dummy1 = 0, dummy2 = 0;
struct inferior *inf;
struct thread_info *tp;
@@ -2003,6 +2003,7 @@ reattach_breakpoints (int pid)
inferior_ptid = tp->ptid;
+ tmp_error_stream = mem_fileopen ();
make_cleanup_ui_file_delete (tmp_error_stream);
ALL_BP_LOCATIONS (bl, blp_tmp)