diff options
author | Armin Rigo <arigo@tunes.org> | 2005-09-20 18:07:47 (GMT) |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2005-09-20 18:07:47 (GMT) |
commit | a6eb56cf4672cedb813af1c228df14d1d2208c7a (patch) | |
tree | 4da3b4a41688de2c5bdce8e0c225f682e8895da2 /Python/thread_pthread.h | |
parent | b53355ad773723aa9f9ac4d70f21010a80e07d62 (diff) | |
download | cpython-a6eb56cf4672cedb813af1c228df14d1d2208c7a.zip cpython-a6eb56cf4672cedb813af1c228df14d1d2208c7a.tar.gz cpython-a6eb56cf4672cedb813af1c228df14d1d2208c7a.tar.bz2 |
Don't call memset() before checking that the ptr is not NULL.
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r-- | Python/thread_pthread.h | 2 |
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, |