]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] bpo-45126: Fix ref. leak in `sqlite3.Connection.__init__` (GH-28231). (GH...
authorErlend Egeberg Aasland <erlend.aasland@innova.no>
Mon, 13 Sep 2021 03:16:01 +0000 (05:16 +0200)
committerGitHub <noreply@github.com>
Mon, 13 Sep 2021 03:16:01 +0000 (12:16 +0900)
Modules/_sqlite/connection.c

index 5813e34d57afed8202647008274bed0fd7548707..2cc5f53a30bc0c8f3231cd22205ff73e5a29010c 100644 (file)
@@ -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;
     }