summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2019-02-26 07:12:10 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-02-26 07:12:10 (GMT)
commitd5a551c2694e32835bcdafc01d611f3227ca36b3 (patch)
tree446f3767f994323ca693e301b8a260a026c73004 /Objects
parentf57cd8288dbe6aba99c057f37ad6d58f8db75350 (diff)
downloadcpython-d5a551c2694e32835bcdafc01d611f3227ca36b3.zip
cpython-d5a551c2694e32835bcdafc01d611f3227ca36b3.tar.gz
cpython-d5a551c2694e32835bcdafc01d611f3227ca36b3.tar.bz2
closes bpo-36115: Fix some reference leaks in typeobject.c. (GH-12045)
a24107b04c1277e3c1105f98aff5bfa3a98b33a0 introduced a few refleaks. https://bugs.python.org/issue36115
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index e559c64..403f3ca 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -4962,6 +4962,7 @@ add_getset(PyTypeObject *type, PyGetSetDef *gsp)
return -1;
if (PyDict_GetItemWithError(dict, PyDescr_NAME(descr))) {
+ Py_DECREF(descr);
continue;
}
else if (PyErr_Occurred()) {
@@ -7689,6 +7690,7 @@ super_getattro(PyObject *self, PyObject *name)
return res;
}
else if (PyErr_Occurred()) {
+ Py_DECREF(mro);
return NULL;
}