8000 GH-90699: fix refleak in `_testcapimodule.c` by kumaraditya303 · Pull Request #99236 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-90699: fix refleak in _testcapimodule.c #99236

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 2 commits into from
Nov 8, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
fix nit
  • Loading branch information
kumaraditya303 authored Nov 8, 2022
commit 47560dc4ea16672f79b49228e01d441e21ed29b2
2 changes: 1 addition & 1 deletion Modules/_testcapimodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3375,14 +3375,14 @@ slot_tp_del(PyObject *self)
}
/* Execute __del__ method, if any. */
del = _PyType_Lookup(Py_TYPE(self), tp_del);
Py_DECREF(tp_del);
if (del != NULL) {
res = PyObject_CallOneArg(del, self);
if (res == NULL)
PyErr_WriteUnraisable(del);
else
Py_DECREF(res);
}
Py_DECREF(tp_del);

/* Restore the saved exception. */
PyErr_Restore(error_type, error_value, error_traceback);
Expand Down
0