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