From 1a3b95e66263d935dce9111148307ff31bf888ac Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sat, 4 Nov 2006 17:33:15 +0000 Subject: [PATCH] initialize scard_mutex git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1328 423420c4-83ab-492f-b58f-81f9feb106b5 --- scard.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scard.c b/scard.c index 0903293..26cfe8f 100644 --- a/scard.c +++ b/scard.c @@ -2623,8 +2623,15 @@ scard_lock(int lock) { if (!scard_mutex) { + int i; + scard_mutex = (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])