commit | a6eb56cf4672cedb813af1c228df14d1d2208c7a | [log] [tgz] |
---|---|---|
author | Armin Rigo <arigo@tunes.org> | Tue Sep 20 18:07:47 2005 +0000 |
committer | Armin Rigo <arigo@tunes.org> | Tue Sep 20 18:07:47 2005 +0000 |
tree | 4da3b4a41688de2c5bdce8e0c225f682e8895da2 | |
parent | b53355ad773723aa9f9ac4d70f21010a80e07d62 [diff] [blame] |
Don't call memset() before checking that the ptr is not NULL.
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_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,