]> granicus.if.org Git - python/commitdiff
bpo-18372: Add missing PyObject_GC_Track() calls in the pickle module (GH-8505)
authorZackery Spytz <zspytz@gmail.com>
Tue, 23 Apr 2019 11:56:08 +0000 (05:56 -0600)
committerInada Naoki <songofacandy@gmail.com>
Tue, 23 Apr 2019 11:56:08 +0000 (20:56 +0900)
Misc/NEWS.d/next/Core and Builtins/2018-12-08-03-40-43.bpo-18372.DT1nR0.rst [new file with mode: 0644]
Modules/_pickle.c

diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-12-08-03-40-43.bpo-18372.DT1nR0.rst b/Misc/NEWS.d/next/Core and Builtins/2018-12-08-03-40-43.bpo-18372.DT1nR0.rst
new file mode 100644 (file)
index 0000000..d8205b8
--- /dev/null
@@ -0,0 +1,2 @@
+Add missing :c:func:`PyObject_GC_Track` calls in the :mod:`pickle` module.
+Patch by Zackery Spytz.
index f956a382ac53104aee49f7cfa176287be86ba735..391ce5e923c6d3a6054285c72a5f7b602f656c59 100644 (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;
 }