From a3c11cebf174e0c822eda8c545f7548269ce7a25 Mon Sep 17 00:00:00 2001 From: Erlend Egeberg Aasland Date: Wed, 25 Aug 2021 15:57:54 +0200 Subject: [PATCH] bpo-27334: Fix reference leak introduced by GH-26202 (GH-27942) --- Modules/_sqlite/connection.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 1bc045523a252e..19d30d24d7f2e7 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); } }