summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2002-04-21 23:29:22 +0000
committerArtur Bergman <sky@nanisky.com>2002-04-21 23:29:22 +0000
commit1ea20f421a49b3c1ecb2a2fcef2f8a40d21ccdfc (patch)
treea20130699666333fea062e88d1807d8acf762a55
parent91f3b821ca3eaa8b7d74bb338729ba51b7b68a90 (diff)
downloadperl-1ea20f421a49b3c1ecb2a2fcef2f8a40d21ccdfc.tar.gz
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
-rwxr-xr-xext/threads/threads.xs4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs
index 0e1992320c..eea6d652ad 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);