mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	fixed a potential refcount bug (thanks Raymond!).
This commit is contained in:
		
							parent
							
								
									a70b19147f
								
							
						
					
					
						commit
						41c9f880d8
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1824,10 +1824,10 @@ builtin_sum(PyObject *self, PyObject *args)
 | 
			
		|||
		if (PyObject_TypeCheck(result, &PyBaseString_Type)) {
 | 
			
		||||
			PyErr_SetString(PyExc_TypeError,
 | 
			
		||||
				"can't sum strings [use ''.join(seq) instead]");
 | 
			
		||||
			Py_DECREF(result);
 | 
			
		||||
			Py_DECREF(iter);
 | 
			
		||||
			return NULL;
 | 
			
		||||
		}
 | 
			
		||||
		Py_INCREF(result);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for(;;) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue