summaryrefslogtreecommitdiff
path: root/Modules/sunaudiodev.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-01-19 06:09:39 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2006-01-19 06:09:39 +0000
commitbc26c3d05080a66c1f4070b87bac5188e5dfab85 (patch)
tree395453563b1bc2f5b8d7321046a9790f6e1a8460 /Modules/sunaudiodev.c
parentbe04cc0bec9a7ca748a957384795af18aacd08c1 (diff)
downloadcpython-bc26c3d05080a66c1f4070b87bac5188e5dfab85.tar.gz
Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
Diffstat (limited to 'Modules/sunaudiodev.c')
-rw-r--r--Modules/sunaudiodev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/sunaudiodev.c b/Modules/sunaudiodev.c
index 3269c761d6..802184d0d6 100644
--- a/Modules/sunaudiodev.c
+++ b/Modules/sunaudiodev.c
@@ -456,6 +456,8 @@ initsunaudiodev(void)
PyObject *m, *d;
m = Py_InitModule("sunaudiodev", sunaudiodev_methods);
+ if (m == NULL)
+ return;
d = PyModule_GetDict(m);
SunAudioError = PyErr_NewException("sunaudiodev.error", NULL, NULL);
if (SunAudioError)