Commit a5191f2
committed
gh-151815: Fix segfault in template_iter on allocation failure
Initialize stringsiter and interpolationsiter to NULL immediately
after PyObject_GC_New so that templateiter_clear can safely run
Py_CLEAR if a subsequent PyObject_GetIter call fails.1 parent 1b9fe5c commit a5191f2
2 files changed
Lines changed: 4 additions & 0 deletions
File tree
- Misc/NEWS.d/next/Core_and_Builtins
- Objects
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
229 | 231 | | |
230 | 232 | | |
231 | 233 | | |
| |||
0 commit comments