changeset 21246:4fb09861b4eb

Fix loader code: closed .dll file handles when it should not
author reimar
date Sun, 26 Nov 2006 13:02:02 +0000
parents 89cf78cf2620
children c0400a8091a8
files loader/ext.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/loader/ext.c	Sun Nov 26 13:01:09 2006 +0000
+++ b/loader/ext.c	Sun Nov 26 13:02:02 2006 +0000
@@ -369,7 +369,7 @@
     else
         answer=mmap(NULL, len, mmap_access, MAP_PRIVATE, hFile, 0);
 
-    if(hFile != -1)
+    if(anon && hFile != -1)
         close(hFile);
     if(answer!=(LPVOID)-1)
     {
@@ -395,7 +395,7 @@
 	    fm->name=NULL;
 	fm->mapping_size=len;
 
-	if(hFile != -1)
+	if(anon && hFile != -1)
 	    close(hFile);
 	return (HANDLE)answer;
     }