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/termios.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Modules/termios.c') diff --git a/Modules/termios.c b/Modules/termios.c index a1d14a18b8..c53566c12b 100644 --- a/Modules/termios.c +++ b/Modules/termios.c @@ -910,6 +910,8 @@ PyInit_termios(void) m = Py_InitModule4("termios", termios_methods, termios__doc__, (PyObject *)NULL, PYTHON_API_VERSION); + if (m == NULL) + return; if (TermiosError == NULL) { TermiosError = PyErr_NewException("termios.error", NULL, NULL); -- cgit v1.2.1