mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Issue #3740: Null-initialize module state.
Reviewed by Benjamin Peterson.
This commit is contained in:
parent
651423c1eb
commit
4e0630cb52
2 changed files with 3 additions and 0 deletions
|
@ -113,6 +113,7 @@ PyModule_Create2(struct PyModuleDef* module, int module_api_version)
|
|||
Py_DECREF(m);
|
||||
return NULL;
|
||||
}
|
||||
memset(m->md_state, 0, module->m_size);
|
||||
}
|
||||
|
||||
d = PyModule_GetDict((PyObject*)m);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue