Commit 48fb766f authored by Segev Finer's avatar Segev Finer Committed by Serhiy Storchaka

bpo-30567: Fix refleak in sys.getwindowsversion (#1940)

parent 9be4ff35
...@@ -973,10 +973,10 @@ sys_getwindowsversion(PyObject *self) ...@@ -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()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment