mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	bpo-40998: Fix a refleak in create_filter() (GH-23365)
This commit is contained in:
		
							parent
							
								
									8fba9523cf
								
							
						
					
					
						commit
						d1e38d4023
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -69,12 +69,14 @@ create_filter(PyObject *category, _Py_Identifier *id, const char *modname) | ||||||
|             return NULL; |             return NULL; | ||||||
|         } |         } | ||||||
|     } else { |     } else { | ||||||
|         modname_obj = Py_None; |         modname_obj = Py_NewRef(Py_None); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /* This assumes the line number is zero for now. */ |     /* This assumes the line number is zero for now. */ | ||||||
|     return PyTuple_Pack(5, action_str, Py_None, |     PyObject *filter = PyTuple_Pack(5, action_str, Py_None, | ||||||
|                                     category, modname_obj, _PyLong_GetZero()); |                                     category, modname_obj, _PyLong_GetZero()); | ||||||
|  |     Py_DECREF(modname_obj); | ||||||
|  |     return filter; | ||||||
| } | } | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner