mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Add a missed PyErr_NoMemory() in symtable_new(). (GH-10576)
This missed PyErr_NoMemory() could cause a SystemError when calling _symtable.symtable().
This commit is contained in:
		
							parent
							
								
									90d0cfb222
								
							
						
					
					
						commit
						ad65f15581
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -210,8 +210,10 @@ symtable_new(void) | |||
|     struct symtable *st; | ||||
| 
 | ||||
|     st = (struct symtable *)PyMem_Malloc(sizeof(struct symtable)); | ||||
|     if (st == NULL) | ||||
|     if (st == NULL) { | ||||
|         PyErr_NoMemory(); | ||||
|         return NULL; | ||||
|     } | ||||
| 
 | ||||
|     st->st_filename = NULL; | ||||
|     st->st_blocks = NULL; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Zackery Spytz
						Zackery Spytz