$NetBSD: patch-ad,v 1.2 2005/03/07 15:30:44 adam Exp $ --- threadpool.c.orig 2004-12-14 04:56:23.000000000 +0000 +++ threadpool.c @@ -279,9 +279,10 @@ unsigned int CP_ThreadPool_Release(CP_ST void CP_ThreadPool_QueueWorkItem(CP_SThreadPool *pTPThis, CP_TPfnJob pfnCallback, void *arg1, void *arg2) { + CP_STPJobQueue *pTPJQNewJob; ts_mutex_lock(pTPThis->mtJobQueueMutex); - CP_STPJobQueue *pTPJQNewJob = malloc(sizeof(CP_STPJobQueue)); + pTPJQNewJob = malloc(sizeof(CP_STPJobQueue)); pTPJQNewJob->fnJobCallback = pfnCallback; pTPJQNewJob->arg1 = arg1;