bpo-18372: Add missing PyObject_GC_Track() calls in the pickle module (GH-8505)

This commit is contained in:
Zackery Spytz 2019-04-23 05:56:08 -06:00 committed by Inada Naoki
parent 09415ff0eb
commit 359bd4f61b
2 changed files with 5 additions and 0 deletions

View file

@ -0,0 +1,2 @@
Add missing :c:func:`PyObject_GC_Track` calls in the :mod:`pickle` module.
Patch by Zackery Spytz.

View file

@ -1119,6 +1119,8 @@ _Pickler_New(void)
Py_DECREF(self);
return NULL;
}
PyObject_GC_Track(self);
return self;
}
@ -1496,6 +1498,7 @@ _Unpickler_New(void)
return NULL;
}
PyObject_GC_Track(self);
return self;
}