From fb9f89ef6a7c8a497c9d23302285cfab5fb38ade Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Fri, 5 May 2023 14:59:56 -0700 Subject: [PATCH] fix refleak --- Python/compile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Python/compile.c b/Python/compile.c index a5e2db89a3003c..85131bd1664b0d 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -5133,8 +5133,10 @@ pop_inlined_comprehension_state(struct compiler *c, location loc, // we set to False instead of clearing, so we can track which names // were temporarily fast-locals and should use CO_FAST_HIDDEN if (PyDict_SetItem(c->u->u_metadata.u_fasthidden, k, Py_False)) { + Py_DECREF(k); return ERROR; } + Py_DECREF(k); } Py_CLEAR(state.fast_hidden); }