# HG changeset patch # User reimar # Date 1164546122 0 # Node ID 4fb09861b4eb942e22aee00543eb4ddf52813f11 # Parent 89cf78cf262034a604fb7c47e005d32bf32720c9 Fix loader code: closed .dll file handles when it should not diff -r 89cf78cf2620 -r 4fb09861b4eb loader/ext.c --- 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; }