Kaydet (Commit) 18056fb1 authored tarafından Miss Islington (bot)'s avatar Miss Islington (bot) Kaydeden (comit) Serhiy Storchaka

bpo-32020: arraymodule: Correct missing Py_DECREF in failure case of make_array() (GH-4391) (#4392)

(cherry picked from commit 56935a53)
üst 6ed9d4ec
......@@ -1885,8 +1885,10 @@ make_array(PyTypeObject *arraytype, char typecode, PyObject *items)
return NULL;
new_args = PyTuple_New(2);
if (new_args == NULL)
if (new_args == NULL) {
Py_DECREF(typecode_obj);
return NULL;
}
Py_INCREF(items);
PyTuple_SET_ITEM(new_args, 0, typecode_obj);
PyTuple_SET_ITEM(new_args, 1, items);
......
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