diff options
| author | Neal Norwitz <nnorwitz@gmail.com> | 2006-01-19 06:09:39 +0000 |
|---|---|---|
| committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-01-19 06:09:39 +0000 |
| commit | bc26c3d05080a66c1f4070b87bac5188e5dfab85 (patch) | |
| tree | 395453563b1bc2f5b8d7321046a9790f6e1a8460 /Modules/cdmodule.c | |
| parent | be04cc0bec9a7ca748a957384795af18aacd08c1 (diff) | |
| download | cpython-bc26c3d05080a66c1f4070b87bac5188e5dfab85.tar.gz | |
Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
Diffstat (limited to 'Modules/cdmodule.c')
| -rw-r--r-- | Modules/cdmodule.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/cdmodule.c b/Modules/cdmodule.c index 25add3e1b6..f8efd395a1 100644 --- a/Modules/cdmodule.c +++ b/Modules/cdmodule.c @@ -760,6 +760,8 @@ initcd(void) PyObject *m, *d; m = Py_InitModule("cd", CD_methods); + if (m == NULL) + return; d = PyModule_GetDict(m); CdError = PyErr_NewException("cd.error", NULL, NULL); |
