diff Modules/syslogmodule.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 e89b1a240ff7
children 3fe3ccdf0155
line wrap: on
line diff
--- a/Modules/syslogmodule.c	Wed Jan 18 20:04:02 2006 +0000
+++ b/Modules/syslogmodule.c	Thu Jan 19 06:09:39 2006 +0000
@@ -163,6 +163,8 @@
 
 	/* Create the module and add the functions */
 	m = Py_InitModule("syslog", syslog_methods);
+	if (m == NULL)
+		return;
 
 	/* Add some symbolic constants to the module */