Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.12] gh-102251: Fix reference leak in _testsinglephase initialization (GH-105082) #105083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-102251: Fix reference leak in _testsinglephase initialization (GH-…
…105082)

Correctly decref 'initialized' in init_module()

(cherry picked from commit d14eb34)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
  • Loading branch information
2 people authored and miss-islington committed May 30, 2023
commit 7924bd62f1ce2116dc573f8be51ebf84c8c57a6a
4 changes: 3 additions & 1 deletion 4 Modules/_testsinglephase.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ init_module(PyObject *module, module_state *state)
if (initialized == NULL) {
return -1;
}
if (PyModule_AddObjectRef(module, "_module_initialized", initialized) != 0) {
int rc = PyModule_AddObjectRef(module, "_module_initialized", initialized);
Py_DECREF(initialized);
if (rc < 0) {
return -1;
}

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.