mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	bpo-30567: Fix refleak in sys.getwindowsversion (#1940)
This commit is contained in:
		
							parent
							
								
									9be4ff359d
								
							
						
					
					
						commit
						48fb766f70
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -973,10 +973,10 @@ sys_getwindowsversion(PyObject *self)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        PyMem_RawFree(verblock);
 | 
					        PyMem_RawFree(verblock);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    PyStructSequence_SET_ITEM(version, pos++, PyTuple_Pack(3,
 | 
					    PyStructSequence_SET_ITEM(version, pos++, Py_BuildValue("(kkk)",
 | 
				
			||||||
        PyLong_FromLong(realMajor),
 | 
					        realMajor,
 | 
				
			||||||
        PyLong_FromLong(realMinor),
 | 
					        realMinor,
 | 
				
			||||||
        PyLong_FromLong(realBuild)
 | 
					        realBuild
 | 
				
			||||||
    ));
 | 
					    ));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (PyErr_Occurred()) {
 | 
					    if (PyErr_Occurred()) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue