mirror of
https://github.com/python/cpython.git
synced 2026-01-27 05:05:50 +00:00
Fix refleaks in new unicodedata classes added in gh-74902 (GH-143843)
This commit is contained in:
parent
14f96a8d8f
commit
85013d7a55
@ -1885,9 +1885,11 @@ typedef struct {
|
||||
static void
|
||||
Segment_dealloc(PyObject *self)
|
||||
{
|
||||
PyTypeObject *tp = Py_TYPE(self);
|
||||
PyObject_GC_UnTrack(self);
|
||||
Py_DECREF(((SegmentObject *)self)->string);
|
||||
PyObject_GC_Del(self);
|
||||
tp->tp_free(self);
|
||||
Py_DECREF(tp);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -1959,9 +1961,11 @@ typedef struct {
|
||||
static void
|
||||
GBI_dealloc(PyObject *self)
|
||||
{
|
||||
PyTypeObject *tp = Py_TYPE(self);
|
||||
PyObject_GC_UnTrack(self);
|
||||
Py_DECREF(((GraphemeBreakIterator *)self)->iter.str);
|
||||
PyObject_GC_Del(self);
|
||||
tp->tp_free(self);
|
||||
Py_DECREF(tp);
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user