diff options
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index b88703c7da..cdefc58d78 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -3871,6 +3871,8 @@ init_socket(void) m = Py_InitModule3(PySocket_MODULE_NAME, socket_methods, socket_doc); + if (m == NULL) + return; socket_error = PyErr_NewException("socket.error", NULL, NULL); if (socket_error == NULL) |