Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e144507

Browse files
committed
There was a possibility that the initialization of _sqlite, when it failed,
would lead to a decref of a NULL. Fixes issue #11110.
1 parent eefb97c commit e144507

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Core and Builtins
1515
Library
1616
-------
1717

18+
- Issue #11110: Fix a potential decref of a NULL in sqlite3.
19+
1820
- Issue #8275: Fix passing of callback arguments with ctypes under Win64.
1921
Patch by Stan Mihai.
2022

Modules/_sqlite/module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ PyMODINIT_FUNC PyInit__sqlite3(void)
329329
(pysqlite_statement_setup_types() < 0) ||
330330
(pysqlite_prepare_protocol_setup_types() < 0)
331331
) {
332-
Py_DECREF(module);
332+
Py_XDECREF(module);
333333
return NULL;
334334
}
335335

0 commit comments

Comments
 (0)