Skip to content

Commit c2deb79

Browse files
gh-159739: Track group records for cyclic garbage collection (#159778)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent 17df836 commit c2deb79

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Allow cyclic garbage collection to reclaim group records returned by
2+
:mod:`grp`.

‎Modules/grpmodule.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ mkgrent(PyObject *module, struct group *p)
111111
return NULL;
112112
}
113113

114+
PyObject_GC_Track(v);
114115
return v;
115116
}
116117

0 commit comments

Comments
 (0)