Merged revisions 88337 via svnmerge from
authorBrett Cannon <bcannon@gmail.com>
Fri, 4 Feb 2011 20:30:30 +0000 (20:30 +0000)
committerBrett Cannon <bcannon@gmail.com>
Fri, 4 Feb 2011 20:30:30 +0000 (20:30 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88337 | brett.cannon | 2011-02-04 12:24:02 -0800 (Fri, 04 Feb 2011) | 5 lines

  There was a possibility that the initialization of _sqlite, when it failed,
  would lead to a decref of a NULL.

  Fixes issue #11110.
........

Misc/NEWS
Modules/_sqlite/module.c

index b1647419fea1af74e9b9c608f8a488f1d9e2f93e..d65a52c6d6901f663cff8a7788c5fe78cac3edc2 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #11110: Fix _sqlite to not deref a NULL when module creation fails.
+
 - Issue #11089: Fix performance issue limiting the use of ConfigParser()
   with large config files.
 
index 155703cdce8423639fecbd329b8d505bc04e7f18..2ca848dd56b13e3656a7f5272df57e58601bdf5e 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;
     }