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/structmodule.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Modules/structmodule.c') diff --git a/Modules/structmodule.c b/Modules/structmodule.c index 137b8988e0..f07f21a30c 100644 --- a/Modules/structmodule.c +++ b/Modules/structmodule.c @@ -1278,6 +1278,8 @@ initstruct(void) /* Create the module and add the functions */ m = Py_InitModule4("struct", struct_methods, struct__doc__, (PyObject*)NULL, PYTHON_API_VERSION); + if (m == NULL) + return; /* Add some symbolic constants to the module */ if (StructError == NULL) { -- cgit v1.2.1