Message94434
I'm not comfortable with the following change (which appears twice in
the patch):
- BZ2_bzReadClose(&bzerror, self->fp);
+ if (self->fp)
+ BZ2_bzReadClose(&bzerror, self->fp);
break;
case MODE_WRITE:
- BZ2_bzWriteClose(&bzerror, self->fp,
- 0, NULL, NULL);
+ if (self->fp)
+ BZ2_bzWriteClose(&bzerror, self->fp,
+ 0, NULL, NULL);
If you need to test for the file pointer, perhaps there's a logic flaw
in your patch. Also, it might be dangerous in write mode: could it occur
that the file isn't closed but the problem isn't reported? |
|
Date |
User |
Action |
Args |
2009-10-24 18:44:20 | pitrou | set | recipients:
+ pitrou, akuchling, niemeyer, therve, thomaslee, r.david.murray, dbonner |
2009-10-24 18:44:20 | pitrou | set | messageid: <1256409860.53.0.080081439536.issue1625@psf.upfronthosting.co.za> |
2009-10-24 18:44:19 | pitrou | link | issue1625 messages |
2009-10-24 18:44:19 | pitrou | create | |
|