Module: wine Branch: master Commit: 3a2e7d1a3dbf42a0385e5c0f64d79e9ea054252e URL: http://source.winehq.org/git/wine.git/?a=commit;h=3a2e7d1a3dbf42a0385e5c0f64...
Author: Alexandre Julliard julliard@winehq.org Date: Fri May 29 15:02:45 2015 +0900
krnl386.exe: Release the Win16 lock when loading a 32-bit dll.
---
dlls/krnl386.exe16/ne_module.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/krnl386.exe16/ne_module.c b/dlls/krnl386.exe16/ne_module.c index c0e1a98..70f8a46 100644 --- a/dlls/krnl386.exe16/ne_module.c +++ b/dlls/krnl386.exe16/ne_module.c @@ -981,8 +981,11 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
if (strlen(basename) < sizeof(dllname)-6) { + DWORD count; char *q;
+ ReleaseThunkLock( &count ); + strcpy( dllname, basename ); q = strrchr( dllname, '.' ); if (!q) strcat( dllname, ".dll" ); @@ -1011,6 +1014,7 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_ { WARN( "couldn't load owner %s for 16-bit dll %s\n", main_module, dllname ); FreeLibrary( mod32 ); + RestoreThunkLock( count ); return ERROR_FILE_NOT_FOUND; } /* check if module was loaded native */ @@ -1023,6 +1027,7 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_ } } } + RestoreThunkLock( count );
/* loading the 32-bit library can have the side effect of loading the module */ /* if so, simply incr the ref count and return the module */