[Python-checkins] closes bpo-35991: Fix a potential double free in Modules/_randommodule.c. (GH-11849)

Benjamin Peterson webhook-mailer at python.org
Thu Feb 14 02:43:22 EST 2019


https://github.com/python/cpython/commit/bb3c05d7efca8d23bf39bc2640297ba2598899f3
commit: bb3c05d7efca8d23bf39bc2640297ba2598899f3
branch: master
author: Zackery Spytz <zspytz at gmail.com>
committer: Benjamin Peterson <benjamin at python.org>
date: 2019-02-13T23:43:17-08:00
summary:

closes bpo-35991: Fix a potential double free in Modules/_randommodule.c. (GH-11849)

files:
A Misc/NEWS.d/next/Core and Builtins/2019-02-14-00-00-30.bpo-35991.xlbfSk.rst
M Modules/_randommodule.c

diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-02-14-00-00-30.bpo-35991.xlbfSk.rst b/Misc/NEWS.d/next/Core and Builtins/2019-02-14-00-00-30.bpo-35991.xlbfSk.rst
new file mode 100644
index 000000000000..4bd55208dada
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2019-02-14-00-00-30.bpo-35991.xlbfSk.rst	
@@ -0,0 +1 @@
+Fix a potential double free in Modules/_randommodule.c.
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index dae9d42fcb22..6a48689204c5 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -292,7 +292,6 @@ random_seed(RandomObject *self, PyObject *args)
                               PY_LITTLE_ENDIAN,
                               0); /* unsigned */
     if (res == -1) {
-        PyMem_Free(key);
         goto Done;
     }
 



More information about the Python-checkins mailing list