summaryrefslogtreecommitdiff
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r--Python/thread_pthread.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index ff4266c72b..40e2e117a2 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -547,9 +547,8 @@ PyThread_allocate_lock(void)
if (!initialized)
PyThread_init_thread();
- lock = (pthread_lock *) PyMem_RawMalloc(sizeof(pthread_lock));
+ lock = (pthread_lock *) PyMem_RawCalloc(1, sizeof(pthread_lock));
if (lock) {
- memset((void *)lock, '\0', sizeof(pthread_lock));
lock->locked = 0;
status = pthread_mutex_init(&lock->mut, NULL);