From: Brett Cannon Date: Fri, 4 Feb 2011 20:30:30 +0000 (+0000) Subject: Merged revisions 88337 via svnmerge from X-Git-Tag: v3.2.1b1~347^2~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7ef4de3d5e1a9dc4b4ff29d447901def678a7fc;p=python Merged revisions 88337 via svnmerge from 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. ........ --- diff --git a/Misc/NEWS b/Misc/NEWS index b1647419fe..d65a52c6d6 100644 --- 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. diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c index 155703cdce..2ca848dd56 100644 --- a/Modules/_sqlite/module.c +++ b/Modules/_sqlite/module.c @@ -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; }