commit | aa6dd54d43dffbdf883c083e361f6ccf8642d66e | [log] [tgz] |
---|---|---|
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | Mon Sep 13 05:16:01 2021 +0200 |
committer | GitHub <noreply@github.com> | Mon Sep 13 12:16:01 2021 +0900 |
tree | 1c487dd0359cc3467a3e6973a4b26788b88db580 | |
parent | 03c7b358406f6660a5ef13b32ace8c67871440f1 [diff] [blame] |
[3.10] bpo-45126: Fix ref. leak in `sqlite3.Connection.__init__` (GH-28231). (GH-28298)
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 5813e34..2cc5f53 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c
@@ -87,6 +87,7 @@ pysqlite_connection_init(pysqlite_Connection *self, PyObject *args, } if (PySys_Audit("sqlite3.connect", "O", database_obj) < 0) { + Py_DECREF(database_obj); return -1; }