diff Python/sysmodule.c @ 39893:6fb46e87d5f9 2.4

[Backport of rev. 42093 by neal.norwitz] Check return result from Py_InitModule*(). This API can fail. Probably should be backported.
author Andrew M. Kuchling <amk@amk.ca>
date Wed, 27 Sep 2006 19:17:32 +0000
parents 11f66731554d
children ab13576374b1
line wrap: on
line diff
--- a/Python/sysmodule.c	Wed Sep 27 19:04:53 2006 +0000
+++ b/Python/sysmodule.c	Wed Sep 27 19:17:32 2006 +0000
@@ -944,6 +944,8 @@
 #endif
 
 	m = Py_InitModule3("sys", sys_methods, sys_doc);
+	if (m == NULL)
+		return NULL;
 	sysdict = PyModule_GetDict(m);
 
 	{