Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 892b194

Browse filesBrowse files
[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 4596c76) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
1 parent 74d0b60 commit 892b194
Copy full SHA for 892b194

File tree

1 file changed

+5
-1
lines changed
Filter options

1 file changed

+5
-1
lines changed

‎Modules/_testinternalcapi.c

Copy file name to clipboardExpand all lines: Modules/_testinternalcapi.c
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,11 @@ record_eval(PyThreadState *tstate, struct _PyInterpreterFrame *f, int exc)
683683
assert(module != NULL);
684684
module_state *state = get_module_state(module);
685685
Py_DECREF(module);
686-
PyList_Append(state->record_list, ((PyFunctionObject *)f->f_funcobj)->func_name);
686+
int res = PyList_Append(state->record_list,
687+
((PyFunctionObject *)f->f_funcobj)->func_name);
688+
if (res < 0) {
689+
return NULL;
690+
}
687691
}
688692
return _PyEval_EvalFrameDefault(tstate, f, exc);
689693
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.