mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	bpo-34190: Fix reference leak in call_function() (GH-8413)
This commit is contained in:
		
							parent
							
								
									caa331d492
								
							
						
					
					
						commit
						147d95511f
					
				
					 1 changed files with 8 additions and 5 deletions
				
			
		|  | @ -4576,12 +4576,15 @@ call_function(PyObject ***pp_stack, Py_ssize_t oparg, PyObject *kwnames) | ||||||
|                profiling. */ |                profiling. */ | ||||||
|             PyObject *self = stack[0]; |             PyObject *self = stack[0]; | ||||||
|             func = Py_TYPE(func)->tp_descr_get(func, self, (PyObject*)Py_TYPE(self)); |             func = Py_TYPE(func)->tp_descr_get(func, self, (PyObject*)Py_TYPE(self)); | ||||||
|             if (func == NULL) { |             if (func != NULL) { | ||||||
|                 return NULL; |                 C_TRACE(x, _PyCFunction_FastCallKeywords(func, | ||||||
|  |                                                          stack+1, nargs-1, | ||||||
|  |                                                          kwnames)); | ||||||
|  |                 Py_DECREF(func); | ||||||
|  |             } | ||||||
|  |             else { | ||||||
|  |                 x = NULL; | ||||||
|             } |             } | ||||||
|             C_TRACE(x, _PyCFunction_FastCallKeywords(func, stack+1, nargs-1, |  | ||||||
|                                                      kwnames)); |  | ||||||
|             Py_DECREF(func); |  | ||||||
|         } |         } | ||||||
|         else { |         else { | ||||||
|             x = _PyMethodDescr_FastCallKeywords(func, stack, nargs, kwnames); |             x = _PyMethodDescr_FastCallKeywords(func, stack, nargs, kwnames); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 jdemeyer
						jdemeyer