re PR c/21879 (Memory management problem)

PR c/21879
	* c-decl.c (start_function): Restore label_context_stack_se and
	label_context_stack_vm  if returning with an error.

From-SVN: r100557
This commit is contained in:
Joseph Myers 2005-06-03 23:25:13 +01:00 committed by Joseph Myers
parent fd693ba3cc
commit d4d1cfd444
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2005-06-03 Joseph S. Myers <joseph@codesourcery.com>
PR c/21879
* c-decl.c (start_function): Restore label_context_stack_se and
label_context_stack_vm if returning with an error.
2005-06-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* configure.ac: Check declaration for asprintf, needed by

View File

@ -5802,7 +5802,11 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
/* If the declarator is not suitable for a function definition,
cause a syntax error. */
if (decl1 == 0)
return 0;
{
label_context_stack_se = label_context_stack_se->next;
label_context_stack_vm = label_context_stack_vm->next;
return 0;
}
decl_attributes (&decl1, attributes, 0);