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/spwdmodule.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Modules/spwdmodule.c') diff --git a/Modules/spwdmodule.c b/Modules/spwdmodule.c index 36dd228683..7c618e7761 100644 --- a/Modules/spwdmodule.c +++ b/Modules/spwdmodule.c @@ -171,6 +171,8 @@ initspwd(void) { PyObject *m; m=Py_InitModule3("spwd", spwd_methods, spwd__doc__); + if (m == NULL) + return; PyStructSequence_InitType(&StructSpwdType, &struct_spwd_type_desc); Py_INCREF((PyObject *) &StructSpwdType); PyModule_AddObject(m, "struct_spwd", (PyObject *) &StructSpwdType); -- cgit v1.2.1