projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1749d80
)
missing DECREF in WriteUnraisable
author
Stefan Behnel
<scoder@users.berlios.de>
Mon, 1 Sep 2008 11:30:13 +0000
(13:30 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Mon, 1 Sep 2008 11:30:13 +0000
(13:30 +0200)
Cython/Compiler/Nodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Nodes.py
b/Cython/Compiler/Nodes.py
index def2e02520b9aba45ff3b9e0f6226400c5987f34..890c658b32a15cf65e43a94f5dfa875ce1f6c2a9 100644
(file)
--- a/
Cython/Compiler/Nodes.py
+++ b/
Cython/Compiler/Nodes.py
@@
-4579,9
+4579,12
@@
static void __Pyx_WriteUnraisable(const char *name) {
ctx = PyUnicode_FromString(name);
#endif
__Pyx_ErrRestore(old_exc, old_val, old_tb);
- if (!ctx)
- ctx = Py_None;
- PyErr_WriteUnraisable(ctx);
+ if (!ctx) {
+ PyErr_WriteUnraisable(Py_None);
+ } else {
+ PyErr_WriteUnraisable(ctx);
+ Py_DECREF(ctx);
+ }
}
"""]