[Pcsclite-cvs-commit] r6128 - /trunk/PCSC/src/readerfactory.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Mon Dec 5 13:44:57 UTC 2011


Author: rousseau
Date: Mon Dec  5 13:44:56 2011
New Revision: 6128

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6128
Log:
RFRemoveReader(): fix a bug with a multi-slot reader

The value sContext->mMutex must be reset to NULL only for the last slot.

Modified:
    trunk/PCSC/src/readerfactory.c

Modified: trunk/PCSC/src/readerfactory.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/readerfactory.c?rev=6128&op=diff
==============================================================================
--- trunk/PCSC/src/readerfactory.c (original)
+++ trunk/PCSC/src/readerfactory.c Mon Dec  5 13:44:56 2011
@@ -498,6 +498,7 @@
 		{
 			(void)pthread_mutex_destroy(sContext->mMutex);
 			free(sContext->mMutex);
+			sContext->mMutex = NULL;
 			free(sContext->library);
 			free(sContext->device);
 			free(sContext->pMutex);
@@ -515,7 +516,6 @@
 
 		sContext->version = 0;
 		sContext->port = 0;
-		sContext->mMutex = NULL;
 		sContext->contexts = 0;
 		sContext->slot = 0;
 		sContext->hLockId = 0;




More information about the Pcsclite-cvs-commit mailing list