GH-100997: fix refleak in `_testinternalcapi.c` (#101058)

This commit is contained in:
Kumar Aditya 2023-01-16 16:11:57 +05:30 committed by GitHub
parent 8e9d08b062
commit 74c20b6ece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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);