Call biofinish() also when we get a malloc() failure.

This commit is contained in:
phk 2003-04-14 08:08:17 +00:00
parent 1287890a35
commit e27444e997
2 changed files with 2 additions and 8 deletions

View File

@ -578,10 +578,7 @@ ccdstart(struct ccd_s *cs, struct bio *bp)
err = ccdbuffer(cbp, cs, bp, bn, addr, bcount);
if (err) {
printf("ccdbuffer error %d\n", err);
/* We're screwed */
bp->bio_resid -= bcount;
bp->bio_error = ENOMEM;
bp->bio_flags |= BIO_ERROR;
biofinish(bp, NULL, err);
return;
}
rcount = cbp[0]->cb_buf.bio_bcount;

View File

@ -578,10 +578,7 @@ ccdstart(struct ccd_s *cs, struct bio *bp)
err = ccdbuffer(cbp, cs, bp, bn, addr, bcount);
if (err) {
printf("ccdbuffer error %d\n", err);
/* We're screwed */
bp->bio_resid -= bcount;
bp->bio_error = ENOMEM;
bp->bio_flags |= BIO_ERROR;
biofinish(bp, NULL, err);
return;
}
rcount = cbp[0]->cb_buf.bio_bcount;