mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
credui: Delete the static critical section when unloading the dll.
This commit is contained in:
parent
17929b925e
commit
8ce78a7b3e
1 changed files with 11 additions and 7 deletions
|
@ -65,19 +65,21 @@ static CRITICAL_SECTION csPendingCredentials = { &critsect_debug, -1, 0, 0, 0, 0
|
||||||
|
|
||||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
{
|
{
|
||||||
|
struct pending_credentials *entry, *cursor2;
|
||||||
TRACE("(0x%p, %d, %p)\n",hinstDLL,fdwReason,lpvReserved);
|
TRACE("(0x%p, %d, %p)\n",hinstDLL,fdwReason,lpvReserved);
|
||||||
|
|
||||||
if (fdwReason == DLL_WINE_PREATTACH) return FALSE; /* prefer native version */
|
switch (fdwReason)
|
||||||
|
|
||||||
if (fdwReason == DLL_PROCESS_ATTACH)
|
|
||||||
{
|
{
|
||||||
|
case DLL_WINE_PREATTACH:
|
||||||
|
return FALSE; /* prefer native version */
|
||||||
|
|
||||||
|
case DLL_PROCESS_ATTACH:
|
||||||
DisableThreadLibraryCalls(hinstDLL);
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
hinstCredUI = hinstDLL;
|
hinstCredUI = hinstDLL;
|
||||||
InitCommonControls();
|
InitCommonControls();
|
||||||
}
|
break;
|
||||||
else if (fdwReason == DLL_PROCESS_DETACH)
|
|
||||||
{
|
case DLL_PROCESS_DETACH:
|
||||||
struct pending_credentials *entry, *cursor2;
|
|
||||||
LIST_FOR_EACH_ENTRY_SAFE(entry, cursor2, &pending_credentials_list, struct pending_credentials, entry)
|
LIST_FOR_EACH_ENTRY_SAFE(entry, cursor2, &pending_credentials_list, struct pending_credentials, entry)
|
||||||
{
|
{
|
||||||
list_remove(&entry->entry);
|
list_remove(&entry->entry);
|
||||||
|
@ -88,6 +90,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
HeapFree(GetProcessHeap(), 0, entry->pszPassword);
|
HeapFree(GetProcessHeap(), 0, entry->pszPassword);
|
||||||
HeapFree(GetProcessHeap(), 0, entry);
|
HeapFree(GetProcessHeap(), 0, entry);
|
||||||
}
|
}
|
||||||
|
DeleteCriticalSection(&csPendingCredentials);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue