diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-04-02 02:27:20 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-04-02 02:27:20 +0000 |
commit | 9795ddd9e75978bfc54599f0e560af778d611a2f (patch) | |
tree | 0064bcf43eb01c01a12c130151a99874c442ca3b /Python/symtable.c | |
parent | 34eed6be0bb68b4d2f9d740c987a1ffcd1f2a2af (diff) | |
download | cpython-9795ddd9e75978bfc54599f0e560af778d611a2f.tar.gz |
rewrite error handling to make sense
Diffstat (limited to 'Python/symtable.c')
-rw-r--r-- | Python/symtable.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index 92b223276f..3c1735ca99 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -824,14 +824,18 @@ analyze_child_block(PySTEntryObject *entry, PyObject *bound, PyObject *free, if (!analyze_block(entry, temp_bound, temp_free, temp_global)) goto error; - success = PyNumber_InPlaceOr(child_free, temp_free) >= 0; + if (PyNumber_InPlaceOr(child_free, temp_free) < 0) + goto error; Py_DECREF(child_free); - success = 1; + Py_DECREF(temp_bound); + Py_DECREF(temp_free); + Py_DECREF(temp_global); + return 1; error: Py_XDECREF(temp_bound); Py_XDECREF(temp_free); Py_XDECREF(temp_global); - return success; + return 0; } static int |