From 6c7ad722952683310b19700ddc92adf27599361d Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Thu, 5 Sep 2013 13:40:16 +0200 Subject: [PATCH] Fixed thread handling. --- channels/smartcard/client/smartcard_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/channels/smartcard/client/smartcard_main.c b/channels/smartcard/client/smartcard_main.c index 855df3ff0..90eed80aa 100644 --- a/channels/smartcard/client/smartcard_main.c +++ b/channels/smartcard/client/smartcard_main.c @@ -112,13 +112,16 @@ struct _SMARTCARD_IRP_WORKER }; typedef struct _SMARTCARD_IRP_WORKER SMARTCARD_IRP_WORKER; -static void smartcard_process_irp_thread_func(SMARTCARD_IRP_WORKER* irpWorker) +static void *smartcard_process_irp_thread_func(SMARTCARD_IRP_WORKER* irpWorker) { smartcard_process_irp(irpWorker->smartcard, irpWorker->irp); CloseHandle(irpWorker->thread); free(irpWorker); + + ExitThread(0); + return NULL; } static void* smartcard_thread_func(void* arg)