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:
parent
e9b936c73c
commit
4f9bcb9f4f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user