Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix reference leaks in list/dict.clear
  • Loading branch information
hauntsaninja committed Apr 16, 2026
commit 0e662a79e967c7ec30482e0bbdc2f64fcb540598
1 change: 1 addition & 0 deletions mypyc/lib-rt/dict_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ char CPyDict_Clear(PyObject *dict) {
if (res == NULL) {
return 0;
}
Py_DECREF(res);
}
return 1;
}
Expand Down
1 change: 1 addition & 0 deletions mypyc/lib-rt/list_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ char CPyList_Clear(PyObject *list) {
if (res == NULL) {
return 0;
}
Py_DECREF(res);
}
return 1;
}
Expand Down
Loading