mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Check NULL if Py_InitModule fails.
This commit is contained in:
parent
82f6cc4728
commit
32feb8592f
1 changed files with 2 additions and 1 deletions
|
@ -388,7 +388,8 @@ errorexit:
|
|||
init_codecs_##loc(void) \
|
||||
{ \
|
||||
PyObject *m = Py_InitModule("_codecs_" #loc, __methods);\
|
||||
(void)register_maps(m); \
|
||||
if (m != NULL) \
|
||||
(void)register_maps(m); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue