Fixed thread handling.
authorArmin Novak <anovak@thinstuff.com>
Thu, 5 Sep 2013 11:40:16 +0000 (13:40 +0200)
committerArmin Novak <anovak@thinstuff.com>
Thu, 5 Sep 2013 11:40:16 +0000 (13:40 +0200)
channels/smartcard/client/smartcard_main.c

index 855df3f..90eed80 100644 (file)
@@ -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)