Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb9f89e

Browse files
committed
fix refleak
1 parent 46c7a4f commit fb9f89e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Python/compile.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5133,8 +5133,10 @@ pop_inlined_comprehension_state(struct compiler *c, location loc,
51335133
// we set to False instead of clearing, so we can track which names
51345134
// were temporarily fast-locals and should use CO_FAST_HIDDEN
51355135
if (PyDict_SetItem(c->u->u_metadata.u_fasthidden, k, Py_False)) {
5136+
Py_DECREF(k);
51365137
return ERROR;
51375138
}
5139+
Py_DECREF(k);
51385140
}
51395141
Py_CLEAR(state.fast_hidden);
51405142
}

0 commit comments

Comments
 (0)