mirror of
https://github.com/mpv-player/mpv
synced 2025-03-01 20:00:37 +00:00
Fix loader code: closed .dll file handles when it should not
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21262 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
5c404f12f4
commit
7d6341459a
@ -369,7 +369,7 @@ HANDLE WINAPI CreateFileMappingA(HANDLE handle, LPSECURITY_ATTRIBUTES lpAttr,
|
||||
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 @@ HANDLE WINAPI CreateFileMappingA(HANDLE handle, LPSECURITY_ATTRIBUTES lpAttr,
|
||||
fm->name=NULL;
|
||||
fm->mapping_size=len;
|
||||
|
||||
if(hFile != -1)
|
||||
if(anon && hFile != -1)
|
||||
close(hFile);
|
||||
return (HANDLE)answer;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user