From a6695f2f2cbb23df9a55c3778517e5f96bca5daf Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Sat, 27 Sep 2008 13:40:27 +0200 Subject: [PATCH] Fixed reference leak for NewTempExprNode --- Cython/Compiler/ExprNodes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index c78f505f..bea8b1b0 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -601,6 +601,8 @@ class NewTempExprNode(ExprNode): def generate_disposal_code(self, code): if self.is_temp: + if self.type.is_pyobject: + code.put_decref_clear(self.result(), self.ctype()) if not self.backwards_compatible_result: code.funcstate.release_temp(self.temp_code) else: -- 2.26.2