summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-08-12 08:47:02 (GMT)
committerGeorg Brandl <georg@python.org>2008-08-12 08:47:02 (GMT)
commite71268f93fa7e33f87180e2895aec5a14505c9fb (patch)
treefd03c6fb9876988dd2f7fa8da0d74112054b4fa5 /Modules
parent032215451bd9a8fc3a068e8a77871277e0f162d8 (diff)
downloadcpython-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.c1
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