[PATCH] winspool.drv: Clear last error when creating mutex
A. Wilcox
AWilcox at Wilcox-Tech.com
Wed Nov 30 15:55:34 CST 2016
A stale error may reside in thread-local storage that causes
WINSPOOL_LoadSystemPrinters to believe initialisation has already
occurred.
This change clears out the last error before creating the mutex.
Signed-off-by: A. Wilcox <AWilcox at Wilcox-Tech.com>
---
dlls/winspool.drv/info.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index 2b2e0fc..dd4e9bd 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -1620,6 +1620,7 @@ void WINSPOOL_LoadSystemPrinters(void)
#endif
/* FIXME: The init code should be moved to spoolsv.exe */
+ SetLastError(0);
init_mutex = CreateMutexW( NULL, TRUE, winspool_mutex_name );
if (!init_mutex)
{
--
2.10.0
More information about the wine-patches
mailing list