projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73b8d9d
)
fix top.c
author
Tom Tromey
<tromey@redhat.com>
Thu, 30 May 2013 17:27:44 +0000
(17:27 +0000)
committer
Tom Tromey
<tromey@redhat.com>
Thu, 30 May 2013 17:27:44 +0000
(17:27 +0000)
execute_command can leak a cleanup along one return path.
* top.c (execute_command): Discard 'cleanup_if_error' cleanups.
gdb/ChangeLog
patch
|
blob
|
history
gdb/top.c
patch
|
blob
|
history
diff --git
a/gdb/ChangeLog
b/gdb/ChangeLog
index 6d51b21b51965580514b5344300bc8f03db017a6..30b2bb0251e77a3b66393b4bcc5896d89c7d3d52 100644
(file)
--- a/
gdb/ChangeLog
+++ b/
gdb/ChangeLog
@@
-1,3
+1,7
@@
+2013-05-30 Tom Tromey <tromey@redhat.com>
+
+ * top.c (execute_command): Discard 'cleanup_if_error' cleanups.
+
2013-05-30 Tom Tromey <tromey@redhat.com>
* stabsread.c (read_struct_type): Call do_cleanups along
diff --git
a/gdb/top.c
b/gdb/top.c
index 480b67e9860de0016a2f33caa59ba02a4d92158c..8ac756f11f9ce16721c3e3faf0cbe7e69adcdfa4 100644
(file)
--- a/
gdb/top.c
+++ b/
gdb/top.c
@@
-425,6
+425,7
@@
execute_command (char *p, int from_tty)
if (p == NULL)
{
do_cleanups (cleanup);
+ discard_cleanups (cleanup_if_error);
return;
}