# 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. <!-- gh-linked-prs --> ### Linked PRs * gh-118614 <!-- /gh-linked-prs -->