projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55fe1ae
)
fix a refleak in slot_sq_length (#1162)
author
Xiang Zhang
<angwerzx@126.com>
Sun, 16 Apr 2017 16:54:21 +0000
(
00:54
+0800)
committer
GitHub
<noreply@github.com>
Sun, 16 Apr 2017 16:54:21 +0000
(
00:54
+0800)
Objects/typeobject.c
patch
|
blob
|
history
diff --git
a/Objects/typeobject.c
b/Objects/typeobject.c
index 89fe82c7c39a7d8a72131e82a29c4c24abec3fa4..9eb725f062ba56259f94e4b7318c1854d91fc28f 100644
(file)
--- a/
Objects/typeobject.c
+++ b/
Objects/typeobject.c
@@
-5931,6
+5931,7
@@
slot_sq_length(PyObject *self)
assert(PyLong_Check(res));
if (Py_SIZE(res) < 0) {
+ Py_DECREF(res);
PyErr_SetString(PyExc_ValueError,
"__len__() should return >= 0");
return -1;