diff options
Diffstat (limited to 'source/compiler/aslstartup.c')
-rw-r--r-- | source/compiler/aslstartup.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source/compiler/aslstartup.c b/source/compiler/aslstartup.c index 1ed69724d2b0..84a23dbeb463 100644 --- a/source/compiler/aslstartup.c +++ b/source/compiler/aslstartup.c @@ -41,7 +41,6 @@ * POSSIBILITY OF SUCH DAMAGES. */ - #include "aslcompiler.h" #include "actables.h" #include "acdisasm.h" @@ -284,8 +283,11 @@ AslDoDisassembly ( return (AE_CTRL_CONTINUE); } - ACPI_FREE (Gbl_Files[ASL_FILE_INPUT].Filename); + /* No need to free the filename string */ + Gbl_Files[ASL_FILE_INPUT].Filename = NULL; + + CmDeleteCaches (); return (AE_OK); } @@ -325,8 +327,13 @@ AslDoOneFile ( return (Status); } - Gbl_Files[ASL_FILE_INPUT].Filename = Filename; - UtConvertBackslashes (Filename); + /* Take a copy of the input filename, convert any backslashes */ + + Gbl_Files[ASL_FILE_INPUT].Filename = + UtStringCacheCalloc (strlen (Filename) + 1); + + strcpy (Gbl_Files[ASL_FILE_INPUT].Filename, Filename); + UtConvertBackslashes (Gbl_Files[ASL_FILE_INPUT].Filename); /* * AML Disassembly (Optional) @@ -396,7 +403,6 @@ AslDoOneFile ( if (Gbl_Signature) { - ACPI_FREE (Gbl_Signature); Gbl_Signature = NULL; } |