mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 11:49:12 +00:00 
			
		
		
		
	SF patch #798534: Windows os.popen needlessly gets a reference to tuple ()
(Contributed by Andrew Gaul.) Fixes a minor leak.
This commit is contained in:
		
							parent
							
								
									14cc1e3222
								
							
						
					
					
						commit
						b5cb66542d
					
				
					 1 changed files with 1 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -3615,7 +3615,7 @@ static PyObject *_PyPopenProcs = NULL;
 | 
			
		|||
static PyObject *
 | 
			
		||||
posix_popen(PyObject *self, PyObject *args)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *f, *s;
 | 
			
		||||
	PyObject *f;
 | 
			
		||||
	int tm = 0;
 | 
			
		||||
 | 
			
		||||
	char *cmdstring;
 | 
			
		||||
| 
						 | 
				
			
			@ -3624,8 +3624,6 @@ posix_popen(PyObject *self, PyObject *args)
 | 
			
		|||
	if (!PyArg_ParseTuple(args, "s|si:popen", &cmdstring, &mode, &bufsize))
 | 
			
		||||
		return NULL;
 | 
			
		||||
 | 
			
		||||
	s = PyTuple_New(0);
 | 
			
		||||
 | 
			
		||||
	if (*mode == 'r')
 | 
			
		||||
		tm = _O_RDONLY;
 | 
			
		||||
	else if (*mode != 'w') {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue