mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
g_clone_bio() can fail, be ready for this.
Approved by: le
This commit is contained in:
parent
8160bf78a3
commit
1b39b2f671
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131625
@ -93,8 +93,12 @@ gv_start(struct bio *bp)
|
||||
case BIO_WRITE:
|
||||
case BIO_DELETE:
|
||||
bp2 = g_clone_bio(bp);
|
||||
bp2->bio_done = g_std_done;
|
||||
g_io_request(bp2, LIST_FIRST(&gp->consumer));
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user