initialize scard_mutex

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1328 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Michael Gernoth 2006-11-04 17:33:15 +00:00
parent c3f49ea246
commit 1a3b95e662

View File

@ -2623,8 +2623,15 @@ scard_lock(int lock)
{ {
if (!scard_mutex) if (!scard_mutex)
{ {
int i;
scard_mutex = scard_mutex =
(pthread_mutex_t **) xmalloc(sizeof(pthread_mutex_t *) * SCARD_LOCK_LAST); (pthread_mutex_t **) xmalloc(sizeof(pthread_mutex_t *) * SCARD_LOCK_LAST);
for (i = 0; i < SCARD_LOCK_LAST; i++)
{
scard_mutex[i] = NULL;
}
} }
if (!scard_mutex[lock]) if (!scard_mutex[lock])