diff Python/sysmodule.c @ 36324:1af7f719ed28 legacy-trunk

Check return result from Py_InitModule*(). This API can fail. Probably should be backported.
author Neal Norwitz <nnorwitz@gmail.com>
date Thu, 19 Jan 2006 06:09:39 +0000
parents cee05980f1fd
children 7fdc639bc5b4
line wrap: on
line diff
--- a/Python/sysmodule.c	Wed Jan 18 20:04:02 2006 +0000
+++ b/Python/sysmodule.c	Thu Jan 19 06:09:39 2006 +0000
@@ -1027,6 +1027,8 @@
 #endif
 
 	m = Py_InitModule3("sys", sys_methods, sys_doc);
+	if (m == NULL)
+		return NULL;
 	sysdict = PyModule_GetDict(m);
 
 	{