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/cStringIO.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Modules/cStringIO.c') diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c index 0d50459166..ad2f36b9b3 100644 --- a/Modules/cStringIO.c +++ b/Modules/cStringIO.c @@ -716,6 +716,7 @@ initcStringIO(void) { m = Py_InitModule4("cStringIO", IO_methods, cStringIO_module_documentation, (PyObject*)NULL,PYTHON_API_VERSION); + if (m == NULL) return; /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); -- cgit v1.2.1