Commit 48d49497 authored by Meador Inge's avatar Meador Inge

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

Thanks to Suman Saha for finding the bug and providing a patch.
parents f0c51fab b86ecf4b
...@@ -828,6 +828,7 @@ Mark Russell ...@@ -828,6 +828,7 @@ Mark Russell
Nick Russo Nick Russo
Patrick Sabin Patrick Sabin
Sébastien Sablé Sébastien Sablé
Suman Saha
Hajime Saitou Hajime Saitou
George Sakkis George Sakkis
Rich Salz Rich Salz
......
...@@ -1295,6 +1295,9 @@ Tools/Demos ...@@ -1295,6 +1295,9 @@ Tools/Demos
Extension Modules 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 - Issue #13022: Fix: _multiprocessing.recvfd() doesn't check that
file descriptor was actually received. file descriptor was actually received.
......
...@@ -4474,6 +4474,7 @@ PyCArrayType_from_ctype(PyObject *itemtype, Py_ssize_t length) ...@@ -4474,6 +4474,7 @@ PyCArrayType_from_ctype(PyObject *itemtype, Py_ssize_t length)
if (!PyType_Check(itemtype)) { if (!PyType_Check(itemtype)) {
PyErr_SetString(PyExc_TypeError, PyErr_SetString(PyExc_TypeError,
"Expected a type object"); "Expected a type object");
Py_DECREF(key);
return NULL; return NULL;
} }
#ifdef MS_WIN64 #ifdef MS_WIN64
......
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