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/_heapqmodule.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Modules/_heapqmodule.c') diff --git a/Modules/_heapqmodule.c b/Modules/_heapqmodule.c index 5a78c453e1..999647e11a 100644 --- a/Modules/_heapqmodule.c +++ b/Modules/_heapqmodule.c @@ -610,6 +610,8 @@ init_heapq(void) PyObject *m; m = Py_InitModule3("_heapq", heapq_methods, module_doc); + if (m == NULL) + return; PyModule_AddObject(m, "__about__", PyString_FromString(__about__)); } -- cgit v1.2.1