Skip to content

Commit 6a5a1a9

Browse files
committed
Fix refcount
1 parent bf48bb4 commit 6a5a1a9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Python/optimizer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ _Py_ClearExecutorDeletionList(PyInterpreterState *interp)
277277

278278
for (Py_ssize_t i = 0; i < PyList_GET_SIZE(to_free); i++) {
279279
_PyExecutorObject *exec = (_PyExecutorObject *)PyList_GET_ITEM(to_free, i);
280+
PyList_SET_ITEM(to_free, i, NULL);
280281
_PyExecutor_Free(exec);
281282
}
282283
Py_DECREF(to_free);

0 commit comments

Comments
 (0)