Issue #3740: Null-initialize module state.

Reviewed by Benjamin Peterson.
This commit is contained in:
Martin v. Löwis 2008-10-07 13:16:28 +00:00
parent 651423c1eb
commit 4e0630cb52
2 changed files with 3 additions and 0 deletions

View file

@ -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);