diff options
| author | Armin Rigo <arigo@tunes.org> | 2005-09-20 18:07:47 +0000 |
|---|---|---|
| committer | Armin Rigo <arigo@tunes.org> | 2005-09-20 18:07:47 +0000 |
| commit | 7b0c3bf62e193ab4427b70e7c71037cbad457f9d (patch) | |
| tree | c40f515d1f40bc18ef6640c0c188601828e5de8d /Python/thread_pthread.h | |
| parent | 93856ff6587edd1d50a4d4e413f44485abced97e (diff) | |
| download | cpython-7b0c3bf62e193ab4427b70e7c71037cbad457f9d.tar.gz | |
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 a415a434be..781467f84b 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, |
