bpo-18372: Add missing PyObject_GC_Track() calls in the pickle module… · python/cpython@c0f6f53

File tree

2 files changed

lines changed

  • Misc/NEWS.d/next/Core and Builtins

2 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,2 @@

1+

Add missing :c:func:`PyObject_GC_Track` calls in the :mod:`pickle` module.

2+

Patch by Zackery Spytz.

Original file line numberDiff line numberDiff line change

@@ -1114,6 +1114,8 @@ _Pickler_New(void)

11141114

Py_DECREF(self);

11151115

return NULL;

11161116

}

1117+
1118+

PyObject_GC_Track(self);

11171119

return self;

11181120

}

11191121

@@ -1491,6 +1493,7 @@ _Unpickler_New(void)

14911493

return NULL;

14921494

}

14931495
1496+

PyObject_GC_Track(self);

14941497

return self;

14951498

}

14961499