--- a/Modules/bz2module.c
+++ b/Modules/bz2module.c
@@ -1426,7 +1426,7 @@
 	int datasize;
 	int bufsize = SMALLCHUNK;
 	long totalout;
-	PyObject *ret;
+	PyObject *ret = NULL;
 	bz_stream *bzs = &self->bzs;
 	int bzerror;
 
@@ -1495,7 +1495,7 @@
 BZ2Comp_flush(BZ2CompObject *self)
 {
 	int bufsize = SMALLCHUNK;
-	PyObject *ret;
+	PyObject *ret = NULL;
 	bz_stream *bzs = &self->bzs;
 	int totalout;
 	int bzerror;
@@ -1905,7 +1905,7 @@
 	char *data;
 	int datasize;
 	int bufsize;
-	PyObject *ret;
+	PyObject *ret = NULL;
 	bz_stream _bzs;
 	bz_stream *bzs = &_bzs;
 	int bzerror;