summaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2022-12-04 18:26:29 +0100
committerArmin Rigo <arigo@tunes.org>2022-12-04 18:26:29 +0100
commit97d2ed49cebd47618fa1cee435085a2bdd64fcd3 (patch)
tree24f91859b92c6e9356c57d64755d276fdcb3551b /c
parent5701750b89042b73af15630f4561f0d81f206ce2 (diff)
downloadcffi-97d2ed49cebd47618fa1cee435085a2bdd64fcd3.tar.gz
Issue 553
Two missing calls to PyObject_GC_UnTrack()
Diffstat (limited to 'c')
-rw-r--r--c/_cffi_backend.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
index b9618bd..d2dc76c 100644
--- a/c/_cffi_backend.c
+++ b/c/_cffi_backend.c
@@ -1938,6 +1938,7 @@ static void cdataowninggc_dealloc(CDataObject *cd)
static void cdatafrombuf_dealloc(CDataObject *cd)
{
Py_buffer *view = ((CDataObject_frombuf *)cd)->bufferview;
+ PyObject_GC_UnTrack(cd);
cdata_dealloc(cd);
PyBuffer_Release(view);
@@ -2043,6 +2044,7 @@ static void cdatagcp_dealloc(CDataObject_gcp *cd)
{
PyObject *destructor = cd->destructor;
PyObject *origobj = cd->origobj;
+ PyObject_GC_UnTrack(cd);
cdata_dealloc((CDataObject *)cd);
gcp_finalize(destructor, origobj);