According to the docs, PyModule_AddObject() only decrements the reference count of value _on success_. Calling code must Py_DECREF() manually on error.
Erlend Egeberg Aasland and others added 9 commits
erlend-aasland
changed the title
bpo-40737: Use PyModule_AddObject() correctly in sqlite3
bpo-40737: Use PyModule_AddType() in sqlite3
erlend-aasland
changed the title
bpo-40737: Use PyModule_AddType() in sqlite3
bpo-40737: Fix possible reference leak for sqlite3 initialization
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
…thonGH-20323) (cherry picked from commit 5eb45d7) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
miss-islington added a commit that referenced this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters