]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34503: Fix refleak in PyErr_SetObject() (GH-8934)
authorAlexey Izbyshev <izbyshev@ispras.ru>
Sun, 26 Aug 2018 16:31:25 +0000 (19:31 +0300)
committerXiang Zhang <angwerzx@126.com>
Sun, 26 Aug 2018 16:31:25 +0000 (00:31 +0800)
Python/errors.c

index 98910b44908764a8caf7127f589c9f083c3d0266..2926ea1918e68140c37eb542b826055041b9896f 100644 (file)
@@ -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;
             }