New GitHub issue #118613 from sobolevn:<br>

<hr>

<pre>
# Bug report

Here's the problematic code: https://github.com/python/cpython/blob/d8d94911e2393bd30ca58a32b33d792307fdc00d/Python/ceval.c#L2497-L2504

What's wrong?
1. `PyDict_New()` can return `NULL`, it is not checked
2. `Py_DECREF(locals);` is only called on success, but not on error


Refs https://github.com/python/cpython/commit/b034f14a4b6e9197d3926046721b8b4b4b4f5b3d

I have a PR ready.
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/118613">View on GitHub</a>
<p>Labels: type-bug, interpreter-core</p>
<p>Assignee: sobolevn</p>