1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

g_clone_bio() can fail, be ready for this.

Approved by:	le
This commit is contained in:
Pawel Jakub Dawidek 2004-07-05 13:24:22 +00:00
parent 8160bf78a3
commit 1b39b2f671
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131625

View File

@ -93,8 +93,12 @@ gv_start(struct bio *bp)
case BIO_WRITE:
case BIO_DELETE:
bp2 = g_clone_bio(bp);
if (bp2 == NULL)
g_io_deliver(bp, ENOMEM);
else {
bp2->bio_done = g_std_done;
g_io_request(bp2, LIST_FIRST(&gp->consumer));
}
return;
default:
g_io_deliver(bp, EOPNOTSUPP);