mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[server,proxy] check for nullptr before using scard_call_context
* Make smartcard_call_cancel_all_context return FALSE if a NULL context is supplied. * Do not call smartcard_call_context_signal_stop if the context is NULL
This commit is contained in:
@@ -271,7 +271,8 @@ BOOL pf_channel_smartcard_server_handle(WINPR_ATTR_UNUSED pServerContext* ps,
|
||||
static void channel_stop_and_wait(pf_channel_client_context* scard, BOOL reset)
|
||||
{
|
||||
WINPR_ASSERT(scard);
|
||||
smartcard_call_context_signal_stop(scard->callctx, FALSE);
|
||||
if (scard->callctx)
|
||||
smartcard_call_context_signal_stop(scard->callctx, FALSE);
|
||||
|
||||
while (ArrayList_Count(scard->workObjects) > 0)
|
||||
{
|
||||
@@ -281,7 +282,8 @@ static void channel_stop_and_wait(pf_channel_client_context* scard, BOOL reset)
|
||||
WaitForThreadpoolWorkCallbacks(work, TRUE);
|
||||
}
|
||||
|
||||
smartcard_call_context_signal_stop(scard->callctx, reset);
|
||||
if (scard->callctx)
|
||||
smartcard_call_context_signal_stop(scard->callctx, reset);
|
||||
}
|
||||
|
||||
static void pf_channel_scard_client_context_free(InterceptContextMapEntry* base)
|
||||
|
||||
Reference in New Issue
Block a user