]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-18372: Add missing PyObject_GC_Track() calls in the pickle module (GH-8505)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 23 Apr 2019 12:18:15 +0000 (05:18 -0700)
committerGitHub <noreply@github.com>
Tue, 23 Apr 2019 12:18:15 +0000 (05:18 -0700)
(cherry picked from commit 359bd4f61b9e1493081f4f67882554247b53926a)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
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 15e15cdf45063d276553f1a3c384a5a7c8c6b68a..c8b3ef70f52150006fdc91c4e3378d7f43911d65 100644 (file)
@@ -1114,6 +1114,8 @@ _Pickler_New(void)
         Py_DECREF(self);
         return NULL;
     }
+
+    PyObject_GC_Track(self);
     return self;
 }
 
@@ -1491,6 +1493,7 @@ _Unpickler_New(void)
         return NULL;
     }
 
+    PyObject_GC_Track(self);
     return self;
 }