diff options
author | Tom Tromey <tromey@redhat.com> | 2013-05-30 17:27:44 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-05-30 17:27:44 +0000 |
commit | c5b4e875304c5faf3658e6de1e45d27e4284976c (patch) | |
tree | 770975471e17de98431fac5f9f46be14a90bfad7 /gdb/top.c | |
parent | 5e779115609a2353599ff1a8949b1f562075030f (diff) | |
download | gdb-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.c | 1 |
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; } |