From 649f7deee4e32ecedf0dcdfe571e54134b5be81e Mon Sep 17 00:00:00 2001 From: David Lechevalier Date: Tue, 13 Jan 2026 10:35:03 +0100 Subject: [PATCH] Fix dead lock in smartcard when smartcard_GetStatusChangeW_Call is called with infinit timeout during smartcard logon, we does not have access to cancel field used by smartcard_call_cancel_context We have to use smartcard_call_context_signal_stop which set the event stopEvent parsed by smartcard_GetStatusChangeW_Call --- channels/smartcard/client/smartcard_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/channels/smartcard/client/smartcard_main.c b/channels/smartcard/client/smartcard_main.c index 9564ddbaf..76e6d7bf3 100644 --- a/channels/smartcard/client/smartcard_main.c +++ b/channels/smartcard/client/smartcard_main.c @@ -227,6 +227,7 @@ void smartcard_context_free(void* pCtx) /* cancel blocking calls like SCardGetStatusChange */ WINPR_ASSERT(pContext->smartcard); smartcard_call_cancel_context(pContext->smartcard->callctx, pContext->hContext); + smartcard_call_context_signal_stop(pContext->smartcard->callctx, FALSE); if (pContext->IrpQueue) {