diff options
author | Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | 2023-01-16 10:41:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-16 10:41:57 (GMT) |
commit | 74c20b6ecee125e76c187c3f78c55f39501702ae (patch) | |
tree | 9f8a8f794748bec1185e908754238ea52ac541e7 | |
parent | 8e9d08b062bbabfe439bc73f82e3d7bb3800189e (diff) | |
download | cpython-74c20b6ecee125e76c187c3f78c55f39501702ae.zip cpython-74c20b6ecee125e76c187c3f78c55f39501702ae.tar.gz cpython-74c20b6ecee125e76c187c3f78c55f39501702ae.tar.bz2 |
GH-100997: fix refleak in `_testinternalcapi.c` (#101058)
-rw-r--r-- | Modules/_testinternalcapi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index f53929f..ba57719 100644 --- a/Modules/_testinternalcapi.c +++ b/Modules/_testinternalcapi.c @@ -566,6 +566,7 @@ record_eval(PyThreadState *tstate, struct _PyInterpreterFrame *f, int exc) PyObject *module = _get_current_module(); assert(module != NULL); module_state *state = get_module_state(module); + Py_DECREF(module); PyList_Append(state->record_list, ((PyFunctionObject *)f->f_funcobj)->func_name); } return _PyEval_EvalFrameDefault(tstate, f, exc); |