Kaydet (Commit) 77c45538 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Merge

...@@ -30,10 +30,12 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block, ...@@ -30,10 +30,12 @@ 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->ste_id = k; /* ste owns reference to k */
ste->ste_name = name; ste->ste_name = name;
Py_INCREF(name); Py_INCREF(name);
...@@ -79,7 +81,6 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block, ...@@ -79,7 +81,6 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
return ste; return ste;
fail: fail:
Py_XDECREF(k);
Py_XDECREF(ste); Py_XDECREF(ste);
return NULL; return NULL;
} }
......
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