changeset: 79009:99ab7006e466 branch: 3.2 parent: 79006:2888356cdd4e user: Christian Heimes date: Wed Sep 12 17:58:10 2012 +0200 files: Python/symtable.c description: Cleanup 'k' when the creation of PySTEntryObject fails. ad3824a90261 used to decref 'k' in too many error cases. diff -r 2888356cdd4e -r 99ab7006e466 Python/symtable.c --- a/Python/symtable.c Wed Sep 12 17:52:46 2012 +0200 +++ b/Python/symtable.c Wed Sep 12 17:58:10 2012 +0200 @@ -34,8 +34,10 @@ 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 */

AltStyle によって変換されたページ (->オリジナル) /