From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 14 Feb 2019 08:02:12 +0000 (-0800) Subject: closes bpo-35991: Fix a potential double free in Modules/_randommodule.c. (GH-11849) X-Git-Tag: v3.7.3rc1~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e20893596f4ecbca90be6caecbf8c22c9629376d;p=thirdparty%2FPython%2Fcpython.git closes bpo-35991: Fix a potential double free in Modules/_randommodule.c. (GH-11849) (cherry picked from commit bb3c05d7efca8d23bf39bc2640297ba2598899f3) Co-authored-by: Zackery Spytz --- 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 51677f8b00a4..1a76ba99ab25 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; }