[Python-checkins] cpython (merge default -> default): Merge

antoine.pitrou python-checkins at python.org
Wed Sep 12 18:02:47 CEST 2012


http://hg.python.org/cpython/rev/0191dd144be5
changeset: 79013:0191dd144be5
parent: 79012:8d22d9528164
parent: 79010:5b64fefbc16b
user: Antoine Pitrou <solipsis at pitrou.net>
date: Wed Sep 12 18:02:18 2012 +0200
summary:
 Merge
files:
 Python/symtable.c | 7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Python/symtable.c b/Python/symtable.c
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -30,10 +30,12 @@
 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 @@
 
 return ste;
 fail:
- Py_XDECREF(k);
 Py_XDECREF(ste);
 return NULL;
 }
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

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