diff options
| author | Andrew M. Kuchling <amk@amk.ca> | 2006-09-27 19:17:32 +0000 |
|---|---|---|
| committer | Andrew M. Kuchling <amk@amk.ca> | 2006-09-27 19:17:32 +0000 |
| commit | e7031223e36c43ccd47321b3ff8997c1423e2b9c (patch) | |
| tree | a8822cdeb18e24a91bd5e3e129db1cfa95d05b78 /PC/msvcrtmodule.c | |
| parent | 4c16bac18c82868e3f20a2c4ca8f329605942ff8 (diff) | |
| download | cpython-git-e7031223e36c43ccd47321b3ff8997c1423e2b9c.tar.gz | |
[Backport of rev. 42093 by neal.norwitz]
Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
Diffstat (limited to 'PC/msvcrtmodule.c')
| -rwxr-xr-x | PC/msvcrtmodule.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c index 84cf0c132e..4453023a6a 100755 --- a/PC/msvcrtmodule.c +++ b/PC/msvcrtmodule.c @@ -221,6 +221,8 @@ PyMODINIT_FUNC initmsvcrt(void) { PyObject *m = Py_InitModule("msvcrt", msvcrt_functions); + if (m == NULL) + return; PyObject *d = PyModule_GetDict(m); /* constants for the locking() function's mode argument */ |
