mirror of
https://github.com/python/cpython.git
synced 2025-08-11 04:19:06 +00:00
[3.12] gh-110241: Add missing error check to record_eval
in _testinternalcapi
(GH-110242) (#110244)
gh-110241: Add missing error check to `record_eval` in `_testinternalcapi` (GH-110242)
(cherry picked from commit 4596c76d1a
)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
parent
74d0b60811
commit
892b1942a7
1 changed files with 5 additions and 1 deletions
|
@ -683,7 +683,11 @@ record_eval(PyThreadState *tstate, struct _PyInterpreterFrame *f, int exc)
|
|||
assert(module != NULL);
|
||||
module_state *state = get_module_state(module);
|
||||
Py_DECREF(module);
|
||||
PyList_Append(state->record_list, ((PyFunctionObject *)f->f_funcobj)->func_name);
|
||||
int res = PyList_Append(state->record_list,
|
||||
((PyFunctionObject *)f->f_funcobj)->func_name);
|
||||
if (res < 0) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
return _PyEval_EvalFrameDefault(tstate, f, exc);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue