[Python-checkins] bpo-34503: Fix refleak in PyErr_SetObject() (GH-8934)

Miss Islington (bot) webhook-mailer at python.org
Sun Aug 26 13:13:49 EDT 2018


https://github.com/python/cpython/commit/204fb459ca1d77c2eab02a3191ba2d2216ff2d72
commit: 204fb459ca1d77c2eab02a3191ba2d2216ff2d72
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-08-26T13:13:46-04:00
summary:

bpo-34503: Fix refleak in PyErr_SetObject() (GH-8934)

(cherry picked from commit a2eefa67542c25617a58c03a27c17fd48e2a0856)

Co-authored-by: Alexey Izbyshev <izbyshev at ispras.ru>

files:
M Python/errors.c

diff --git a/Python/errors.c b/Python/errors.c
index 78c0524a1d8a..a08936dda873 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;
             }
 



More information about the Python-checkins mailing list