From: Artur Bergman Date: Sun, 21 Apr 2002 23:29:22 +0000 (+0000) Subject: Do not unlock mutex twice. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1ea20f421a49b3c1ecb2a2fcef2f8a40d21ccdfc;p=p5sagit%2Fp5-mst-13.2.git Do not unlock mutex twice. Do not unlock mutex after it has been destroyed and freed. Do not email p5p without uncrossing eyes. p4raw-id: //depot/perl@16056 --- diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 0e19923..eea6d65 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -198,7 +198,9 @@ ithread_mg_free(pTHX_ SV *sv, MAGIC *mg) MUTEX_UNLOCK(&thread->mutex); Perl_ithread_destruct(aTHX_ thread, "no reference"); } - MUTEX_UNLOCK(&thread->mutex); + else { + MUTEX_UNLOCK(&thread->mutex); + } } else { MUTEX_UNLOCK(&thread->mutex);