Skip to content

Commit

Permalink
pythongh-110241: Add missing error check to record_eval in `_testin…
Browse files Browse the repository at this point in the history
…ternalcapi` (python#110242)
  • Loading branch information
sobolevn authored and Glyphack committed Jan 27, 2024
1 parent 2bc154f commit f92985b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Modules/_testinternalcapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit f92985b

Please sign in to comment.