From 874f07c893ca3f6ef5280307baaa95e07ca6a1d4 Mon Sep 17 00:00:00 2001
From: Zeev Suraski <zeev@php.net>
Date: Sun, 20 Mar 2005 09:04:03 +0000
Subject: [PATCH] MFH

---
 TSRM/TSRM.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c
index ac2cca9321..c4a710f19d 100644
--- a/TSRM/TSRM.c
+++ b/TSRM/TSRM.c
@@ -285,11 +285,11 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
 		}
 	}
 
-	tsrm_mutex_unlock(tsmm_mutex);
-
 	if (tsrm_new_thread_end_handler) {
 		tsrm_new_thread_end_handler(thread_id, &((*thread_resources_ptr)->storage));
 	}
+
+	tsrm_mutex_unlock(tsmm_mutex);
 }
 
 
-- 
2.40.0