mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	gh-100227: Fix Cleanup of the Extensions Cache (gh-103150)
Decref the key in the right interpreter in _extensions_cache_set(). This is a follow-up to gh-103084. I found the bug while working on gh-101660.
This commit is contained in:
		
							parent
							
								
									9048d73f7a
								
							
						
					
					
						commit
						dde028480e
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -983,13 +983,13 @@ _extensions_cache_set(PyObject *filename, PyObject *name, PyModuleDef *def) | |||
|     res = 0; | ||||
| 
 | ||||
| finally: | ||||
|     Py_XDECREF(key); | ||||
|     if (oldts != NULL) { | ||||
|         _PyThreadState_Swap(interp->runtime, oldts); | ||||
|         _PyThreadState_UnbindDetached(main_tstate); | ||||
|         Py_DECREF(name); | ||||
|         Py_DECREF(filename); | ||||
|     } | ||||
|     Py_XDECREF(key); | ||||
|     extensions_lock_release(); | ||||
|     return res; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Eric Snow
						Eric Snow