Mercurial > cpython-lru_cache-weakref
comparison Modules/_sqlite/module.c @ 67863:ce8db485e26e
There was a possibility that the initialization of _sqlite, when it failed,
would lead to a decref of a NULL.
Fixes issue #11110.
| author | Brett Cannon <bcannon@gmail.com> |
|---|---|
| date | Fri, 04 Feb 2011 20:24:02 +0000 |
| parents | e9cd15d539e1 |
| children | 3c9232a684ae |
comparison
equal
deleted
inserted
replaced
| 67860:0bba533c0959 | 67863:ce8db485e26e |
|---|---|
| 327 (pysqlite_connection_setup_types() < 0) || | 327 (pysqlite_connection_setup_types() < 0) || |
| 328 (pysqlite_cache_setup_types() < 0) || | 328 (pysqlite_cache_setup_types() < 0) || |
| 329 (pysqlite_statement_setup_types() < 0) || | 329 (pysqlite_statement_setup_types() < 0) || |
| 330 (pysqlite_prepare_protocol_setup_types() < 0) | 330 (pysqlite_prepare_protocol_setup_types() < 0) |
| 331 ) { | 331 ) { |
| 332 Py_DECREF(module); | 332 Py_XDECREF(module); |
| 333 return NULL; | 333 return NULL; |
| 334 } | 334 } |
| 335 | 335 |
| 336 Py_INCREF(&pysqlite_ConnectionType); | 336 Py_INCREF(&pysqlite_ConnectionType); |
| 337 PyModule_AddObject(module, "Connection", (PyObject*) &pysqlite_ConnectionType); | 337 PyModule_AddObject(module, "Connection", (PyObject*) &pysqlite_ConnectionType); |
