From: Robert Bradshaw Date: Sat, 21 Feb 2009 05:55:25 +0000 (-0800) Subject: Fix memleak in cascaded comparisons. X-Git-Tag: 0.11.rc~73 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ad29b5b827433fab05a5238cd8416cd17790dd76;p=cython.git Fix memleak in cascaded comparisons. --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 6f77046f..47f265ec 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -4814,6 +4814,7 @@ class CascadedCmpNode(Node, CmpNode): def generate_evaluation_code(self, code, result, operand1): if self.type.is_pyobject: code.putln("if (__Pyx_PyObject_IsTrue(%s)) {" % result) + code.put_decref(result, self.type) else: code.putln("if (%s) {" % result) self.operand2.generate_evaluation_code(code)