summaryrefslogtreecommitdiffstats
path: root/Python/errors.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-08-26 17:13:46 (GMT)
committerGitHub <noreply@github.com>2018-08-26 17:13:46 (GMT)
commit204fb459ca1d77c2eab02a3191ba2d2216ff2d72 (patch)
treed1660487a77f35ae36322b1694f96139296d50b0 /Python/errors.c
parentd60bdf239e322316c8b5e37679cb8e789028aae2 (diff)
downloadcpython-204fb459ca1d77c2eab02a3191ba2d2216ff2d72.zip
cpython-204fb459ca1d77c2eab02a3191ba2d2216ff2d72.tar.gz
cpython-204fb459ca1d77c2eab02a3191ba2d2216ff2d72.tar.bz2
bpo-34503: Fix refleak in PyErr_SetObject() (GH-8934)
(cherry picked from commit a2eefa67542c25617a58c03a27c17fd48e2a0856) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Diffstat (limited to 'Python/errors.c')
-rw-r--r--Python/errors.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 78c0524..a08936d 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -97,6 +97,7 @@ PyErr_SetObject(PyObject *exception, PyObject *value)
fixed_value = _PyErr_CreateException(exception, value);
Py_XDECREF(value);
if (fixed_value == NULL) {
+ Py_DECREF(exc_value);
return;
}