summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-08-26 13:13:47 -0400
committerGitHub <noreply@github.com>2018-08-26 13:13:47 -0400
commit2caf86ff6d72d625f86db78c6e90fdaf09e8f703 (patch)
treedf6a4e687c17cb479619f8169401ff66940747e7
parentd6725fcdd54cb3c72201eaa8841dd72d84f5f71d (diff)
downloadcpython-git-2caf86ff6d72d625f86db78c6e90fdaf09e8f703.tar.gz
bpo-34503: Fix refleak in PyErr_SetObject() (GH-8934)
(cherry picked from commit a2eefa67542c25617a58c03a27c17fd48e2a0856) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
-rw-r--r--Python/errors.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 15e6ba0571..8c8ea1cd57 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -110,6 +110,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;
}