projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a76c8a
)
fix reference leak in error case
author
Stefan Behnel
<scoder@users.berlios.de>
Mon, 13 Dec 2010 21:09:26 +0000
(22:09 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Mon, 13 Dec 2010 21:09:26 +0000
(22:09 +0100)
Cython/Compiler/Nodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Nodes.py
b/Cython/Compiler/Nodes.py
index ca893e57ec7f93dce18a376a6702e9fead783dce..ce96a3ba51d4bfecfe1e5c4a3a012161d6fbb8d9 100644
(file)
--- a/
Cython/Compiler/Nodes.py
+++ b/
Cython/Compiler/Nodes.py
@@
-2752,6
+2752,8
@@
class DefNode(FuncDefNode):
code.putln("if (unlikely(!%s)) {" % self.star_arg.entry.cname)
if self.starstar_arg:
code.put_decref(self.starstar_arg.entry.cname, py_object_type)
+ if self.needs_closure:
+ code.put_decref(Naming.cur_scope_cname, self.local_scope.scope_class.type)
code.put_finish_refcount_context()
code.putln('return %s;' % self.error_value())
code.putln('}')