fix top.c

execute_command can leak a cleanup along one return path.

	* top.c (execute_command): Discard 'cleanup_if_error' cleanups.
This commit is contained in:
Tom Tromey 2013-05-30 17:27:44 +00:00
parent 73b8d9dab1
commit 5ae85e4448
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -425,6 +425,7 @@ execute_command (char *p, int from_tty)
if (p == NULL)
{
do_cleanups (cleanup);
discard_cleanups (cleanup_if_error);
return;
}