]> granicus.if.org Git - python/commitdiff
There was a possibility that the initialization of _sqlite, when it failed,
authorBrett Cannon <bcannon@gmail.com>
Fri, 4 Feb 2011 20:24:02 +0000 (20:24 +0000)
committerBrett Cannon <bcannon@gmail.com>
Fri, 4 Feb 2011 20:24:02 +0000 (20:24 +0000)
would lead to a decref of a NULL.

Fixes issue #11110.

Misc/NEWS
Modules/_sqlite/module.c

index 5df056d827ab994905eede237366d47b7ac4e0a2..efb84882ec99c11a79154065515d80fd7e955f8c 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -15,6 +15,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #11110: Fix a potential decref of a NULL in sqlite3.
+
 - Issue #8275: Fix passing of callback arguments with ctypes under Win64.
   Patch by Stan Mihai.
 
index 3292daee83fe7195a1e5e4a8a8c5da548b855777..cbc3b8e90bea2b731951d068aa8ea879960ecf6e 100644 (file)
@@ -329,7 +329,7 @@ PyMODINIT_FUNC PyInit__sqlite3(void)
         (pysqlite_statement_setup_types() < 0) ||
         (pysqlite_prepare_protocol_setup_types() < 0)
        ) {
-        Py_DECREF(module);
+        Py_XDECREF(module);
         return NULL;
     }