From: Benjamin Peterson Date: Thu, 2 Apr 2009 02:27:20 +0000 (+0000) Subject: rewrite error handling to make sense X-Git-Tag: v3.1a2~78 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d1e5493a26a310a25722af3ad342212d2677672c;p=thirdparty%2FPython%2Fcpython.git rewrite error handling to make sense --- diff --git a/Python/symtable.c b/Python/symtable.c index 92b223276fcc..3c1735ca9942 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