diff options
author | Georg Brandl <georg@python.org> | 2008-08-12 08:47:02 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-08-12 08:47:02 (GMT) |
commit | e71268f93fa7e33f87180e2895aec5a14505c9fb (patch) | |
tree | fd03c6fb9876988dd2f7fa8da0d74112054b4fa5 /Modules | |
parent | 032215451bd9a8fc3a068e8a77871277e0f162d8 (diff) | |
download | cpython-e71268f93fa7e33f87180e2895aec5a14505c9fb.zip cpython-e71268f93fa7e33f87180e2895aec5a14505c9fb.tar.gz cpython-e71268f93fa7e33f87180e2895aec5a14505c9fb.tar.bz2 |
#3205: bz2 iterator fails silently on MemoryError
(backport from r65609)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/bz2module.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/bz2module.c b/Modules/bz2module.c index 7d33a77..9e868c5 100644 --- a/Modules/bz2module.c +++ b/Modules/bz2module.c @@ -416,6 +416,7 @@ Util_ReadAhead(BZ2FileObject *f, int bufsize) return 0; } if ((f->f_buf = PyMem_Malloc(bufsize)) == NULL) { + PyErr_NoMemory(); return -1; } Py_BEGIN_ALLOW_THREADS |