8000 [3.11] gh-113842: Add missing error check for PyIter_Next() in Python/symtable.c (GH-113843) by miss-islington · Pull Request #113852 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.11] gh-113842: Add missing error check for PyIter_Next() in Python/symtable.c (GH-113843) #113852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-113842: Add missing error check for PyIter_Next() in Python/symtab…
…le.c (GH-113843)

(cherry picked from commit fda901a)

Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
  • Loading branch information
WolframAlph authored and miss-islington committed Jan 9, 2024
commit f59552a906eed88ee75e96440452cf8598176b9c
6 changes: 6 additions & 0 deletions Python/symtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,12 @@ update_symbols(PyObject *symbols, PyObject *scopes,
}
Py_DECREF(name);
}

/* Check if loop ended because of exception in PyIter_Next */
if (PyErr_Occurred()) {
goto error;
}

Py_DECREF(itr);
Py_DECREF(v_free);
return 1;
Expand Down
0