Alexandre Julliard : winspool: Don' t bother to delete critical sections at process exit.
Alexandre Julliard
julliard at winehq.org
Thu May 16 13:55:06 CDT 2013
Module: wine
Branch: master
Commit: 03041b93baa39c4625e3bcd1dd3c6e4cd6fbf996
URL: http://source.winehq.org/git/wine.git/?a=commit;h=03041b93baa39c4625e3bcd1dd3c6e4cd6fbf996
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu May 16 12:55:05 2013 +0200
winspool: Don't bother to delete critical sections at process exit.
---
dlls/winspool.drv/wspool.c | 18 +++---------------
1 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/dlls/winspool.drv/wspool.c b/dlls/winspool.drv/wspool.c
index 1f25129..bbfb0fb 100644
--- a/dlls/winspool.drv/wspool.c
+++ b/dlls/winspool.drv/wspool.c
@@ -105,20 +105,6 @@ BOOL load_backend(void)
}
/******************************************************************************
- * unload_backend [internal]
- *
- */
-static void unload_backend(void)
-{
- EnterCriticalSection(&backend_cs);
- backend = NULL;
- FreeLibrary(hlocalspl);
- LeaveCriticalSection(&backend_cs);
- DeleteCriticalSection(&backend_cs);
-}
-
-
-/******************************************************************************
* DllMain
*
* Winspool entry point.
@@ -135,7 +121,9 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD reason, LPVOID lpReserved)
break;
}
case DLL_PROCESS_DETACH:
- unload_backend();
+ if (lpReserved) break;
+ DeleteCriticalSection(&backend_cs);
+ FreeLibrary(hlocalspl);
break;
}
More information about the wine-cvs
mailing list