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/mathmodule.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Modules/mathmodule.c') diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index a5fec158d2..e7fc6dd709 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -355,6 +355,8 @@ initmath(void) PyObject *m, *d, *v; m = Py_InitModule3("math", math_methods, module_doc); + if (m == NULL) + goto finally; d = PyModule_GetDict(m); if (!(v = PyFloat_FromDouble(atan(1.0) * 4.0))) -- cgit v1.2.1