[Pcsclite-cvs-commit] r6753 - trunk/Drivers/ccid/src

ludovic.rousseau at free.fr ludovic.rousseau at free.fr
Sat Sep 21 14:16:17 UTC 2013


Author: rousseau
Date: 2013-09-21 14:16:17 +0000 (Sat, 21 Sep 2013)
New Revision: 6753

Modified:
   trunk/Drivers/ccid/src/ifdhandler.c
Log:
CreateChannelByNameOrChannel(): reset ccid_descriptor->readTimeout in
all cases

The value was not restored in the error case. So it was not a bug. But
the Coverity tool complained:

CID 1090609 (#1 of 1): Failure to restore non-local value
(MISSING_RESTORE)20. end_of_scope: Value of non-local
"ccid_descriptor->readTimeout" that was saved in "oldReadTimeout" is not
restored as it was along other paths.


Modified: trunk/Drivers/ccid/src/ifdhandler.c
===================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c	2013-09-16 18:27:04 UTC (rev 6752)
+++ trunk/Drivers/ccid/src/ifdhandler.c	2013-09-21 14:16:17 UTC (rev 6753)
@@ -160,9 +160,6 @@
 		}
 		else
 		{
-			/* set back the old timeout */
-			ccid_descriptor->readTimeout = oldReadTimeout;
-
 			/* Maybe we have a special treatment for this reader */
 			return_value = ccid_open_hack_post(reader_index);
 			if (return_value != IFD_SUCCESS)
@@ -170,6 +167,9 @@
 				DEBUG_CRITICAL("failed");
 			}
 		}
+
+		/* set back the old timeout */
+		ccid_descriptor->readTimeout = oldReadTimeout;
 	}
 
 error:




More information about the Pcsclite-cvs-commit mailing list