 +
 +	current = tsrm_tls_get();
 +
-+	new_ctx = malloc(sizeof(*new_ctx));
 +	allocate_new_resource(&new_ctx, thread_id);
 +	
 +	/* switch back to the context that was in use prior to our creation

retrieving revision 1.43.2.3
diff -u -r1.43.2.3 TSRM.h
--- TSRM/TSRM.h	11 Mar 2005 11:12:07 -0000	1.43.2.3
+++ TSRM/TSRM.h	29 Apr 2005 18:55:43 -0000
@@ -132,6 +132,13 @@
 TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler);
 TSRM_API void *tsrm_set_new_thread_end_handler(tsrm_thread_end_func_t new_thread_end_handler);

 		if (thread_resources) {
 			TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for current thread %d", id, (long) thread_resources->thread_id));
 			/* Read a specific resource from the thread's resources.
@@ -387,6 +386,65 @@
 #endif
 }
 
