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/symtablemodule.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Modules/symtablemodule.c') diff --git a/Modules/symtablemodule.c b/Modules/symtablemodule.c index 7a52aae0e6..c90d7650a1 100644 --- a/Modules/symtablemodule.c +++ b/Modules/symtablemodule.c @@ -53,6 +53,8 @@ init_symtable(void) PyObject *m; m = Py_InitModule("_symtable", symtable_methods); + if (m == NULL) + return; PyModule_AddIntConstant(m, "USE", USE); PyModule_AddIntConstant(m, "DEF_GLOBAL", DEF_GLOBAL); PyModule_AddIntConstant(m, "DEF_LOCAL", DEF_LOCAL); -- cgit v1.2.1