From: Erlend Egeberg Aasland Date: Wed, 25 Aug 2021 13:57:54 +0000 (+0200) Subject: bpo-27334: Fix reference leak introduced by GH-26202 (GH-27942) X-Git-Tag: v3.11.0a1~338 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3c11cebf174e0c822eda8c545f7548269ce7a25;p=thirdparty%2FPython%2Fcpython.git bpo-27334: Fix reference leak introduced by GH-26202 (GH-27942) --- diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 1bc045523a25..19d30d24d7f2 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -1807,6 +1807,7 @@ pysqlite_connection_exit_impl(pysqlite_Connection *self, PyObject *exc_type, _PyErr_ChainExceptions(exc, val, tb); } else { + Py_DECREF(result); PyErr_Restore(exc, val, tb); } }