summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-12-03 20:08:24 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-12-03 20:08:24 (GMT)
commitf8f2138bd4c715f249f397c8f56cf75dec080931 (patch)
treefdb69f03ee11f52a2f44211c6032518b565203f0
parent26c985a8aac1640b5cda1ff278f749933aa118c3 (diff)
downloadcpython-f8f2138bd4c715f249f397c8f56cf75dec080931.zip
cpython-f8f2138bd4c715f249f397c8f56cf75dec080931.tar.gz
cpython-f8f2138bd4c715f249f397c8f56cf75dec080931.tar.bz2
fix refleak in reduce_2 error case
-rw-r--r--Objects/typeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 738ff86..30da5db 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3286,7 +3286,7 @@ reduce_2(PyObject *obj)
PyErr_Format(PyExc_TypeError,
"can't pickle %.200s objects",
((PyTypeObject *)cls)->tp_name);
- return NULL;
+ goto end;
}
getnewargs = PyObject_GetAttrString(obj, "__getnewargs__");