[Pcsclite-cvs-commit] r6459 - /trunk/PCSC/src/readerfactory.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Thu Sep 13 16:30:57 UTC 2012
Author: rousseau
Date: Thu Sep 13 16:30:56 2012
New Revision: 6459
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6459
Log:
RFCreateReaderHandle(): Unref the reader is the handle is already used
The function RFCreateReaderHandle() checks if a handle is already used
by calling RFReaderInfoById() to find the associated reader.
So if RFReaderInfoById() returns with success then the handle is valid
and can't be used. A new random handle must be generated.
But since RFReaderInfoById() called REF_READER() internally we must call
UNREF_READER() to decrement the reference counter.
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=6459&op=diff
==============================================================================
--- trunk/PCSC/src/readerfactory.c (original)
+++ trunk/PCSC/src/readerfactory.c Thu Sep 13 16:30:56 2012
@@ -1070,6 +1070,7 @@
/* do we already use this hCard somewhere? */
ret = RFReaderInfoById(randHandle, &dummy_reader);
+ UNREF_READER(dummy_reader);
}
while (SCARD_S_SUCCESS == ret);
More information about the Pcsclite-cvs-commit
mailing list