Mercurial > cpython-lru_cache-weakref
diff Modules/_cursesmodule.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 | 9347c2b451ba |
| children |
line wrap: on
line diff
--- a/Modules/_cursesmodule.c Wed Sep 27 19:04:53 2006 +0000 +++ b/Modules/_cursesmodule.c Wed Sep 27 19:17:32 2006 +0000 @@ -2488,6 +2488,8 @@ /* Create the module and add the functions */ m = Py_InitModule("_curses", PyCurses_methods); + if (m == NULL) + return; /* Add some symbolic constants to the module */ d = PyModule_GetDict(m);
