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:
parent
c3f49ea246
commit
1a3b95e662
7
scard.c
7
scard.c
@ -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])
|
||||||
|
Loading…
Reference in New Issue
Block a user