mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Don't call memset() before checking that the ptr is not NULL.
This commit is contained in:
		
							parent
							
								
									b53355ad77
								
							
						
					
					
						commit
						a6eb56cf46
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -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, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Armin Rigo
						Armin Rigo