From 22eabaf870e52370c00e5875634385ebf0513627 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 25 Aug 2021 13:35:13 +0200 Subject: [PATCH] bpo-27334: Fix ref. leak --- 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); } }