Commit dfaf90da 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.
parent 65a0141e
...@@ -28,8 +28,10 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block, ...@@ -28,8 +28,10 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
if (k == NULL) if (k == NULL)
goto fail; goto fail;
ste = PyObject_New(PySTEntryObject, &PySTEntry_Type); ste = PyObject_New(PySTEntryObject, &PySTEntry_Type);
if (ste == NULL) if (ste == NULL) {
Py_DECREF(k);
goto fail; goto fail;
}
ste->ste_table = st; ste->ste_table = st;
ste->ste_id = k; /* ste owns reference to k */ 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