Revert "Revert "fix memory leaks in bz_reader_read""

This reverts commit 69766a7e66ca2ea744038016b1bd884e66fc5e5d.