[Python-checkins] Fix uninitialized struct member (GH-19589)

Raymond Hettinger webhook-mailer at python.org
Mon Apr 20 16:47:23 EDT 2020


https://github.com/python/cpython/commit/bba760e9b6c7da3586ed9c8e3d5a0ce2909a97bb
commit: bba760e9b6c7da3586ed9c8e3d5a0ce2909a97bb
branch: master
author: Raymond Hettinger <rhettinger at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-04-20T13:47:12-07:00
summary:

Fix uninitialized struct member (GH-19589)

files:
M Modules/_functoolsmodule.c

diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index 78706b6ec3c4c..fd4b4c268cc97 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -1195,6 +1195,7 @@ lru_cache_new(PyTypeObject *type, PyObject *args, PyObject *kw)
     obj->maxsize = maxsize;
     Py_INCREF(cache_info_type);
     obj->cache_info_type = cache_info_type;
+    obj->dict = NULL;
     return (PyObject *)obj;
 }
 



More information about the Python-checkins mailing list