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/operator.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Modules/operator.c') diff --git a/Modules/operator.c b/Modules/operator.c index ddd0252931..4817d3389c 100644 --- a/Modules/operator.c +++ b/Modules/operator.c @@ -578,6 +578,8 @@ initoperator(void) /* Create the module and add the functions */ m = Py_InitModule4("operator", operator_methods, operator_doc, (PyObject*)NULL, PYTHON_API_VERSION); + if (m == NULL) + return; if (PyType_Ready(&itemgetter_type) < 0) return; -- cgit v1.2.1