summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
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 bbabe10..16201bd 100644
--- a/Modules/bz2module.c
+++ b/Modules/bz2module.c
@@ -1451,6 +1451,7 @@ BZ2File_iternext(BZ2FileObject *self)
PyStringObject* ret;
ACQUIRE_LOCK(self);
if (self->mode == MODE_CLOSED) {
+ RELEASE_LOCK(self);
PyErr_SetString(PyExc_ValueError,
"I/O operation on closed file");
return NULL;