mirror of
https://github.com/python/cpython.git
synced 2026-05-14 06:20:49 +00:00
Fix refleaks in new unicodedata classes added in gh-74902 (GH-143843)
This commit is contained in:
parent
f413b87139
commit
a4665b5067
1 changed files with 6 additions and 2 deletions
|
|
@ -1875,9 +1875,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
|
||||
|
|
@ -1949,9 +1951,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…
Add table
Add a link
Reference in a new issue