mirror of
https://github.com/python/cpython.git
synced 2025-09-12 03:37:09 +00:00
Fix some missing checks after PyTuple_New, PyList_New, PyDict_New
This commit is contained in:
parent
a5a0704942
commit
5c170fd4a9
7 changed files with 27 additions and 7 deletions
|
@ -319,7 +319,9 @@ static PyObject *
|
|||
list2dict(PyObject *list)
|
||||
{
|
||||
Py_ssize_t i, n;
|
||||
PyObject *v, *k, *dict = PyDict_New();
|
||||
PyObject *v, *k;
|
||||
PyObject *dict = PyDict_New();
|
||||
if (!dict) return NULL;
|
||||
|
||||
n = PyList_Size(list);
|
||||
for (i = 0; i < n; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue