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/threadmodule.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Modules/threadmodule.c') diff --git a/Modules/threadmodule.c b/Modules/threadmodule.c index 3025595df1..fccdd62644 100644 --- a/Modules/threadmodule.c +++ b/Modules/threadmodule.c @@ -638,6 +638,8 @@ initthread(void) /* Create the module and add the functions */ m = Py_InitModule3("thread", thread_methods, thread_doc); + if (m == NULL) + return; /* Add a symbolic constant */ d = PyModule_GetDict(m); -- cgit v1.2.1