Skip to content

Commit 5d28bb6

Browse files
miss-islingtonErlend Egeberg Aasland
and
Erlend Egeberg Aasland
authored
[3.10] bpo-45126: Fix ref. leak in sqlite3.Connection.__init__ (GH-28231). (GH-28298)
(cherry picked from commit aa6dd54) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
1 parent 1b02e29 commit 5d28bb6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/_sqlite/connection.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
9797
}
9898

9999
if (PySys_Audit("sqlite3.connect", "O", database_obj) < 0) {
100+
Py_DECREF(database_obj);
100101
return -1;
101102
}
102103

0 commit comments

Comments
 (0)