diff options
Diffstat (limited to 'ace')
-rw-r--r-- | ace/Service_Config.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp index 83778fa80a1..68d2a96ea55 100644 --- a/ace/Service_Config.cpp +++ b/ace/Service_Config.cpp @@ -365,19 +365,21 @@ ACE_Service_Config::process_directives_i (void) ace_yyerrno = 0; ace_yylineno = 1; - // Use an auto_ptr to make sure that we release this memory - // regardless of how we exit... + ACE_Obstack *oldstack = ace_obstack; + ACE_NEW_RETURN (ace_obstack, ACE_Obstack, -1); - auto_ptr<ACE_Obstack> holder (ace_obstack); - ace_yyparse (); + delete ace_obstack; + ace_obstack = oldstack; + if (ace_yyerrno > 0) { - errno = EINVAL; // This is a hack, better errors should be provided... + // This is a hack, better errors should be provided... + errno = EINVAL; return ace_yyerrno; } else |