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

Xiang Zhang webhook-mailer at python.org
Sun Aug 26 12:31:28 EDT 2018


https://github.com/python/cpython/commit/a2eefa67542c25617a58c03a27c17fd48e2a0856
commit: a2eefa67542c25617a58c03a27c17fd48e2a0856
branch: master
author: Alexey Izbyshev <izbyshev at ispras.ru>
committer: Xiang Zhang <angwerzx at 126.com>
date: 2018-08-27T00:31:25+08:00
summary:

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

files:
M Python/errors.c

diff --git a/Python/errors.c b/Python/errors.c
index 98910b449087..2926ea1918e6 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;
             }
 



More information about the Python-checkins mailing list