summaryrefslogtreecommitdiff
path: root/source/compiler/aslsupport.l
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/aslsupport.l')
-rw-r--r--source/compiler/aslsupport.l18
1 files changed, 15 insertions, 3 deletions
diff --git a/source/compiler/aslsupport.l b/source/compiler/aslsupport.l
index 0317041b4e98..7ea43a07dba7 100644
--- a/source/compiler/aslsupport.l
+++ b/source/compiler/aslsupport.l
@@ -42,7 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
/* Configuration */
#define ASL_SPACES_PER_TAB 4
@@ -70,6 +69,15 @@ typedef struct asl_file_node
ASL_FILE_NODE *Gbl_IncludeFileStack = NULL;
+void
+AslParserCleanup (
+ void)
+{
+
+ yy_delete_buffer (YY_CURRENT_BUFFER);
+}
+
+
/*******************************************************************************
*
* FUNCTION: AslDoLineDirective
@@ -259,7 +267,11 @@ AslPushInputFileStack (
/* Reset the global line count and filename */
- Gbl_Files[ASL_FILE_INPUT].Filename = Filename;
+ Gbl_Files[ASL_FILE_INPUT].Filename =
+ UtStringCacheCalloc (strlen (Filename) + 1);
+
+ strcpy (Gbl_Files[ASL_FILE_INPUT].Filename, Filename);
+
Gbl_CurrentLineNumber = 1;
yyin = InputFile;
}
@@ -797,7 +809,7 @@ CompletedString:
*/
*StringBuffer = 0;
- CleanString = UtGetStringBuffer (strlen (MsgBuffer) + 1);
+ CleanString = UtStringCacheCalloc (strlen (MsgBuffer) + 1);
if (!CleanString)
{
AslCommonError (ASL_ERROR, ASL_MSG_MEMORY_ALLOCATION,