summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/thread_pthread.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index a415a43..781467f 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -355,8 +355,8 @@ PyThread_allocate_lock(void)
PyThread_init_thread();
lock = (pthread_lock *) malloc(sizeof(pthread_lock));
- memset((void *)lock, '\0', sizeof(pthread_lock));
if (lock) {
+ memset((void *)lock, '\0', sizeof(pthread_lock));
lock->locked = 0;
status = pthread_mutex_init(&lock->mut,