Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 74c20b6

Browse files
GH-100997: fix refleak in _testinternalcapi.c (#101058)
1 parent 8e9d08b commit 74c20b6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/_testinternalcapi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ record_eval(PyThreadState *tstate, struct _PyInterpreterFrame *f, int exc)
566566
PyObject *module = _get_current_module();
567567
assert(module != NULL);
568568
module_state *state = get_module_state(module);
569+
Py_DECREF(module);
569570
PyList_Append(state->record_list, ((PyFunctionObject *)f->f_funcobj)->func_name);
570571
}
571572
return _PyEval_EvalFrameDefault(tstate, f, exc);

0 commit comments

Comments
 (0)