aboutsummaryrefslogtreecommitdiff
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
commit5ae85e4448395edaa514e8fccb508887472166a0 (patch)
tree25fc86d118a08f129f89fef190b7b004c56edba9 /gdb/top.c
parent73b8d9dab1376f2d43ed8441eda335d2e1156a77 (diff)
downloadgdb-5ae85e4448395edaa514e8fccb508887472166a0.zip
gdb-5ae85e4448395edaa514e8fccb508887472166a0.tar.gz
gdb-5ae85e4448395edaa514e8fccb508887472166a0.tar.bz2
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 480b67e..8ac756f 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;
}