summaryrefslogtreecommitdiffstats
path: root/Modules/_bz2module.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_bz2module.c')
-rw-r--r--Modules/_bz2module.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_bz2module.c b/Modules/_bz2module.c
index e3e0eb1..67e1b65 100644
--- a/Modules/_bz2module.c
+++ b/Modules/_bz2module.c
@@ -534,8 +534,10 @@ decompress(BZ2Decompressor *d, char *data, size_t len, Py_ssize_t max_length)
}
result = decompress_buf(d, max_length);
- if(result == NULL)
+ if(result == NULL) {
+ bzs->next_in = NULL;
return NULL;
+ }
if (d->eof) {
d->needs_input = 0;