diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-08-26 13:13:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-26 13:13:47 -0400 |
commit | 2caf86ff6d72d625f86db78c6e90fdaf09e8f703 (patch) | |
tree | df6a4e687c17cb479619f8169401ff66940747e7 | |
parent | d6725fcdd54cb3c72201eaa8841dd72d84f5f71d (diff) | |
download | cpython-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.c | 1 |
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; } |