[Pcsclite-cvs-commit] r2591 - trunk/Drivers/ccid/examples
rousseau at alioth.debian.org
rousseau at alioth.debian.org
Mon Jul 2 13:05:35 UTC 2007
Author: rousseau
Date: 2007-07-02 13:05:34 +0000 (Mon, 02 Jul 2007)
New Revision: 2591
Modified:
trunk/Drivers/ccid/examples/scardcontrol.c
Log:
do not free() unallocated memory
Modified: trunk/Drivers/ccid/examples/scardcontrol.c
===================================================================
--- trunk/Drivers/ccid/examples/scardcontrol.c 2007-07-02 13:03:41 UTC (rev 2590)
+++ trunk/Drivers/ccid/examples/scardcontrol.c 2007-07-02 13:05:34 UTC (rev 2591)
@@ -61,7 +61,7 @@
LONG rv;
SCARDCONTEXT hContext;
DWORD dwReaders;
- LPSTR mszReaders;
+ LPSTR mszReaders = NULL;
char *ptr, **readers = NULL;
int nbReaders;
SCARDHANDLE hCard;
@@ -553,8 +553,10 @@
rv);
/* free allocated memory */
- free(mszReaders);
- free(readers);
+ if (mszReaders)
+ free(mszReaders);
+ if (readers)
+ free(readers);
return 0;
} /* main */
More information about the Pcsclite-cvs-commit
mailing list