mirror of
https://github.com/python/cpython
synced 2024-10-06 19:54:51 +00:00
gh-110241: Add missing error check to record_eval
in _testinternalcapi
(#110242)
This commit is contained in:
parent
a8f5dab58d
commit
4596c76d1a
|
@ -675,7 +675,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…
Reference in a new issue