From: Tom Tromey Date: Thu, 30 May 2013 17:27:44 +0000 (+0000) Subject: fix top.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5ae85e4448395edaa514e8fccb508887472166a0;p=binutils-gdb.git fix top.c execute_command can leak a cleanup along one return path. * top.c (execute_command): Discard 'cleanup_if_error' cleanups. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6d51b21b519..30b2bb0251e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2013-05-30 Tom Tromey + + * top.c (execute_command): Discard 'cleanup_if_error' cleanups. + 2013-05-30 Tom Tromey * stabsread.c (read_struct_type): Call do_cleanups along 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; }