]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Check for error on module creation
authorAndrew M. Kuchling <amk@amk.ca>
Fri, 9 Jun 2006 13:55:00 +0000 (13:55 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Fri, 9 Jun 2006 13:55:00 +0000 (13:55 +0000)
Modules/zlibmodule.c

index 954984a243884c9484e083472746eebf64b63978..35b8c32fa4420f771e6c32fca47dcbf5536ceefe 100644 (file)
@@ -880,6 +880,8 @@ PyInit_zlib(void)
     m = Py_InitModule4("zlib", zlib_methods,
                       zlib_module_documentation,
                       (PyObject*)NULL,PYTHON_API_VERSION);
+    if (m == NULL)
+       return;
 
     ZlibError = PyErr_NewException("zlib.error", NULL, NULL);
     if (ZlibError != NULL) {