[Pcsclite-cvs-commit] r2282 - trunk/PCSC/src

Ludovic Rousseau rousseau at alioth.debian.org
Mon Dec 25 22:42:44 CET 2006


Author: rousseau
Date: 2006-12-25 22:42:44 +0100 (Mon, 25 Dec 2006)
New Revision: 2282

Modified:
   trunk/PCSC/src/readerfactory.c
Log:
RFAddReader(): fails if RFSetReaderName() fails (too many readers for
the same driver for example)


Modified: trunk/PCSC/src/readerfactory.c
===================================================================
--- trunk/PCSC/src/readerfactory.c	2006-12-25 21:41:51 UTC (rev 2281)
+++ trunk/PCSC/src/readerfactory.c	2006-12-25 21:42:44 UTC (rev 2282)
@@ -155,6 +155,8 @@
 	 */
 	parentNode = RFSetReaderName(sReadersContexts[dwContext], lpcReader,
 		lpcLibrary, dwPort, 0);
+	if (parentNode < -1)
+		return SCARD_E_NO_MEMORY;
 
 	strlcpy((sReadersContexts[dwContext])->lpcLibrary, lpcLibrary,
 		sizeof((sReadersContexts[dwContext])->lpcLibrary));




More information about the Pcsclite-cvs-commit mailing list