mirror of
https://github.com/python/cpython.git
synced 2025-09-29 19:56:59 +00:00
[3.6] bpo-30567: Fix refleak in sys.getwindowsversion (GH-1940) (#1970)
(cherry picked from commit 48fb766
)
This commit is contained in:
parent
e1a60d9032
commit
68e5af89d4
1 changed files with 4 additions and 4 deletions
|
@ -985,10 +985,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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue