aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/dev/acpica/compiler/aslcompile.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2013-06-27 00:16:54 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2013-06-27 00:16:54 +0000
commit8d744e473f37494ab59a15511ed88e473668dfe8 (patch)
treee9a0e51088d3c1e15addea9cd33b6f472b9a6b53 /sys/contrib/dev/acpica/compiler/aslcompile.c
parent49fac6101d4585f468132c72d167c07b6e36326b (diff)
parent94c37fb2483cc09856a30e74879a69f2ccfe22f0 (diff)
Merge ACPICA 20130626.
Notes
Notes: svn path=/head/; revision=252279
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/aslcompile.c')
-rw-r--r--sys/contrib/dev/acpica/compiler/aslcompile.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/contrib/dev/acpica/compiler/aslcompile.c b/sys/contrib/dev/acpica/compiler/aslcompile.c
index fd17c26e0f04..7b2393c87685 100644
--- a/sys/contrib/dev/acpica/compiler/aslcompile.c
+++ b/sys/contrib/dev/acpica/compiler/aslcompile.c
@@ -966,7 +966,19 @@ CmCleanupAndExit (
/* Close all open files */
- Gbl_Files[ASL_FILE_PREPROCESSOR].Handle = NULL; /* the .i file is same as source file */
+ /*
+ * Take care with the preprocessor file (.i), it might be the same
+ * as the "input" file, depending on where the compiler has terminated
+ * or aborted. Prevent attempt to close the same file twice in
+ * loop below.
+ */
+ if (Gbl_Files[ASL_FILE_PREPROCESSOR].Handle ==
+ Gbl_Files[ASL_FILE_INPUT].Handle)
+ {
+ Gbl_Files[ASL_FILE_PREPROCESSOR].Handle = NULL;
+ }
+
+ /* Close the standard I/O files */
for (i = ASL_FILE_INPUT; i < ASL_MAX_FILE_TYPE; i++)
{