summaryrefslogtreecommitdiff
path: root/source/compiler/prutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/prutils.c')
-rw-r--r--source/compiler/prutils.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/compiler/prutils.c b/source/compiler/prutils.c
index d8b7d45c5d395..a93a14e85e979 100644
--- a/source/compiler/prutils.c
+++ b/source/compiler/prutils.c
@@ -340,7 +340,6 @@ PrOpenIncludeWithPrefix (
if (!IncludeFile)
{
fprintf (stderr, "Could not open include file %s\n", Pathname);
- ACPI_FREE (Pathname);
return (NULL);
}
@@ -393,15 +392,17 @@ PrPushInputFileStack (
/* 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_Files[ASL_FILE_INPUT].Handle = InputFile;
Gbl_PreviousLineNumber = 0;
Gbl_CurrentLineNumber = 0;
/* Emit a new #line directive for the include file */
- FlPrintFile (ASL_FILE_PREPROCESSOR, "#line %u \"%s\"\n",
- 1, Filename);
+ FlPrintFile (ASL_FILE_PREPROCESSOR, "#line %u \"%s\"\n", 1, Filename);
}