Commit 3a2e7d1a authored by Alexandre Julliard's avatar Alexandre Julliard

krnl386.exe: Release the Win16 lock when loading a 32-bit dll.

parent c13be744
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment