mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	gh-116296: Fix refleak in reduce_newobj() corner case (#116297)
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
This commit is contained in:
		
							parent
							
								
									1dce0073da
								
							
						
					
					
						commit
						17c4849981
					
				
					 2 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
Fix possible refleak in :meth:`!object.__reduce__` internal error handling.
 | 
			
		||||
| 
						 | 
				
			
			@ -6549,6 +6549,7 @@ reduce_newobj(PyObject *obj)
 | 
			
		|||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        /* args == NULL */
 | 
			
		||||
        Py_DECREF(copyreg);
 | 
			
		||||
        Py_DECREF(kwargs);
 | 
			
		||||
        PyErr_BadInternalCall();
 | 
			
		||||
        return NULL;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue