Mercurial > cpython-lru_cache-weakref
diff Modules/threadmodule.c @ 39893:6fb46e87d5f9 2.4
[Backport of rev. 42093 by neal.norwitz]
Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
| author | Andrew M. Kuchling <amk@amk.ca> |
|---|---|
| date | Wed, 27 Sep 2006 19:17:32 +0000 |
| parents | c260d3b7d582 |
| children | 1696d85ba043 |
line wrap: on
line diff
--- a/Modules/threadmodule.c Wed Sep 27 19:04:53 2006 +0000 +++ b/Modules/threadmodule.c Wed Sep 27 19:17:32 2006 +0000 @@ -650,6 +650,8 @@ /* Create the module and add the functions */ m = Py_InitModule3("thread", thread_methods, thread_doc); + if (m == NULL) + return; /* Add a symbolic constant */ d = PyModule_GetDict(m);
