Skip to content

Commit 46a54e5

Browse files
miss-islingtonjelle-openaiJelleZijlstra
authored
[3.14] gh-159739: Track group records for cyclic garbage collection (GH-159778) (#159905)
(cherry picked from commit c2deb79) Co-authored-by: Jelle Zijlstra <jelle@openai.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent 459a8b8 commit 46a54e5

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)