summaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-05-30 17:27:44 +0000
committerTom Tromey <tromey@redhat.com>2013-05-30 17:27:44 +0000
commitc5b4e875304c5faf3658e6de1e45d27e4284976c (patch)
tree770975471e17de98431fac5f9f46be14a90bfad7 /gdb/top.c
parent5e779115609a2353599ff1a8949b1f562075030f (diff)
downloadgdb-c5b4e875304c5faf3658e6de1e45d27e4284976c.tar.gz
fix top.c
execute_command can leak a cleanup along one return path. * top.c (execute_command): Discard 'cleanup_if_error' cleanups.
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/top.c b/gdb/top.c
index 480b67e9860..8ac756f11f9 100644
--- 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;
}