Commit 10ca1fee authored by Christian Heimes's avatar Christian Heimes

Cleanup 'k' when the creation of PySTEntryObject fails. ad3824a90261 used to...

Cleanup 'k' when the creation of PySTEntryObject fails. ad3824a90261 used to decref 'k' in too many error cases.
parents 9c5b521c 55ad6515
......@@ -30,8 +30,10 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
if (k == NULL)
goto fail;
ste = PyObject_New(PySTEntryObject, &PySTEntry_Type);
if (ste == NULL)
if (ste == NULL) {
Py_DECREF(k);
goto fail;
}
ste->ste_table = st;
ste->ste_id = k; /* ste owns reference to k */
......
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