diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-09-12 21:07:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-12 21:07:32 -0700 |
commit | 5d28bb699a305135a220a97ac52e90d9344a3004 (patch) | |
tree | 3ce4492514eda2e2bdbad4124cf0fa3a89b83240 /Modules | |
parent | 1b02e29fb2751ccd14fab6c12f0f79940e3ce531 (diff) | |
download | cpython-git-5d28bb699a305135a220a97ac52e90d9344a3004.tar.gz |
[3.10] bpo-45126: Fix ref. leak in `sqlite3.Connection.__init__` (GH-28231). (GH-28298)
(cherry picked from commit aa6dd54d43dffbdf883c083e361f6ccf8642d66e)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_sqlite/connection.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 0949e8d408..68bf97389a 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -97,6 +97,7 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject } if (PySys_Audit("sqlite3.connect", "O", database_obj) < 0) { + Py_DECREF(database_obj); return -1; } |