From 1ac754fa10f5d199d19911e21185d0970cb3073f Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Thu, 19 Jan 2006 06:09:39 +0000 Subject: Check return result from Py_InitModule*(). This API can fail. Probably should be backported. --- Modules/socketmodule.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Modules/socketmodule.c') 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) -- cgit v1.2.1