From ad29b5b827433fab05a5238cd8416cd17790dd76 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Fri, 20 Feb 2009 21:55:25 -0800 Subject: [PATCH] Fix memleak in cascaded comparisons. --- Cython/Compiler/ExprNodes.py | 1 + 1 file changed, 1 insertion(+) 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) -- 2.26.2