diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-09-12 16:02:18 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-09-12 16:02:18 (GMT) |
commit | 77c45538f79a1b0110e088d256a222d68563354d (patch) | |
tree | 7b137754393001fe5f555b5479852380b6d15a94 | |
parent | 9d20e0edd966431fa63e85ff7c04087de0c9ed7c (diff) | |
parent | 10ca1fee8f293af317cbcca0f38b15a300036b7b (diff) | |
download | cpython-77c45538f79a1b0110e088d256a222d68563354d.zip cpython-77c45538f79a1b0110e088d256a222d68563354d.tar.gz cpython-77c45538f79a1b0110e088d256a222d68563354d.tar.bz2 |
Merge
-rw-r--r-- | Python/symtable.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index d2bb889..1c291bb 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -30,10 +30,12 @@ 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->ste_id = k; /* ste owns reference to k */ ste->ste_name = name; Py_INCREF(name); @@ -79,7 +81,6 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block, return ste; fail: - Py_XDECREF(k); Py_XDECREF(ste); return NULL; } |