mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Fix refleak in __import__("") (probably the cause of the 2 refleaks in
test_builtin.)
This commit is contained in:
		
							parent
							
								
									22495c02e2
								
							
						
					
					
						commit
						4bdaa271d6
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -1938,6 +1938,8 @@ import_module_level(char *name, PyObject *globals, PyObject *locals, | |||
| 		/* If tail is Py_None, both get_parent and load_next found
 | ||||
| 		   an empty module name: someone called __import__("") or | ||||
| 		   doctored faulty bytecode */ | ||||
| 		Py_DECREF(tail); | ||||
| 		Py_DECREF(head); | ||||
| 		PyErr_SetString(PyExc_ValueError, | ||||
| 				"Empty module name"); | ||||
| 		return NULL; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thomas Wouters
						Thomas Wouters