Commit 359bd4f6 authored by Zackery Spytz's avatar Zackery Spytz Committed by Inada Naoki

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

parent 09415ff0
Add missing :c:func:`PyObject_GC_Track` calls in the :mod:`pickle` module.
Patch by Zackery Spytz.
...@@ -1119,6 +1119,8 @@ _Pickler_New(void) ...@@ -1119,6 +1119,8 @@ _Pickler_New(void)
Py_DECREF(self); Py_DECREF(self);
return NULL; return NULL;
} }
PyObject_GC_Track(self);
return self; return self;
} }
...@@ -1496,6 +1498,7 @@ _Unpickler_New(void) ...@@ -1496,6 +1498,7 @@ _Unpickler_New(void)
return NULL; return NULL;
} }
PyObject_GC_Track(self);
return self; return self;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment