mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Add missing Py_DECREF in fast_cfunction. Partial fix for SF bug
#127699.
This commit is contained in:
		
							parent
							
								
									2a78cf2288
								
							
						
					
					
						commit
						eec72a7fd9
					
				
					 1 changed files with 6 additions and 3 deletions
				
			
		|  | @ -2769,9 +2769,12 @@ fast_cfunction(PyObject *func, PyObject ***pp_stack, int na) | |||
| 
 | ||||
| 	if (na == 0) | ||||
| 		return (*meth)(self, NULL); | ||||
| 	else if (na == 1) | ||||
| 		return (*meth)(self, EXT_POP(*pp_stack)); | ||||
| 	else { | ||||
| 	else if (na == 1) { | ||||
| 		PyObject *arg = EXT_POP(*pp_stack); | ||||
| 		PyObject *result =  (*meth)(self, arg);  | ||||
| 		Py_DECREF(arg); | ||||
| 		return result; | ||||
| 	} else { | ||||
| 		PyObject *args = load_args(pp_stack, na); | ||||
| 		PyObject *result = (*meth)(self, args); | ||||
| 		Py_DECREF(args); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Charles G. Waldman
						Charles G. Waldman