Fix bio leak in case of malloc(9) failure.

Found by:	Coverity Prevent(tm)
Coverity ID:	CID794
MFC after:	3 days
This commit is contained in:
Pawel Jakub Dawidek 2006-01-18 21:44:57 +00:00
parent e9b936c73c
commit 4f9bcb9f4f

View File

@ -287,6 +287,7 @@ g_uzip_start(struct bio *bp)
bp2->bio_offset, bp2->bio_length));
bp2->bio_data = malloc(bp2->bio_length, M_GEOM_UZIP, M_NOWAIT);
if (bp2->bio_data == NULL) {
g_destroy_bio(bp2);
g_io_deliver(bp, ENOMEM);
return;
}