mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
bpo-30567: Fix refleak in sys.getwindowsversion (#1940)
This commit is contained in:
committed by
Serhiy Storchaka
parent
9be4ff359d
commit
48fb766f70
@@ -973,10 +973,10 @@ sys_getwindowsversion(PyObject *self)
|
||||
}
|
||||
PyMem_RawFree(verblock);
|
||||
}
|
||||
PyStructSequence_SET_ITEM(version, pos++, PyTuple_Pack(3,
|
||||
PyLong_FromLong(realMajor),
|
||||
PyLong_FromLong(realMinor),
|
||||
PyLong_FromLong(realBuild)
|
||||
PyStructSequence_SET_ITEM(version, pos++, Py_BuildValue("(kkk)",
|
||||
realMajor,
|
||||
realMinor,
|
||||
realBuild
|
||||
));
|
||||
|
||||
if (PyErr_Occurred()) {
|
||||
|
||||
Reference in New Issue
Block a user