Issue #13013: ctypes: Fix a reference leak in PyCArrayType_from_ctype.

Thanks to Suman Saha for finding the bug and providing a patch.
This commit is contained in:
Meador Inge 2011-09-27 20:52:04 -05:00
commit 48d49497c5
3 changed files with 5 additions and 0 deletions

View File

@ -828,6 +828,7 @@ Mark Russell
Nick Russo
Patrick Sabin
Sébastien Sablé
Suman Saha
Hajime Saitou
George Sakkis
Rich Salz

View File

@ -1295,6 +1295,9 @@ Tools/Demos
Extension Modules
-----------------
- Issue #13013: ctypes: Fix a reference leak in PyCArrayType_from_ctype.
Thanks to Suman Saha for finding the bug and providing a patch.
- Issue #13022: Fix: _multiprocessing.recvfd() doesn't check that
file descriptor was actually received.

View File

@ -4474,6 +4474,7 @@ PyCArrayType_from_ctype(PyObject *itemtype, Py_ssize_t length)
if (!PyType_Check(itemtype)) {
PyErr_SetString(PyExc_TypeError,
"Expected a type object");
Py_DECREF(key);
return NULL;
}
#ifdef MS_WIN64