summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/geom/geom_slice.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c
index c91c1cf..bc46df7 100644
--- a/sys/geom/geom_slice.c
+++ b/sys/geom/geom_slice.c
@@ -191,6 +191,10 @@ g_slice_start(struct bio *bp)
}
#endif
bp2 = g_clone_bio(bp);
+ if (bp2 == NULL) {
+ g_io_fail(bp, ENOMEM);
+ return;
+ }
bp2->bio_done = g_std_done;
g_io_request(bp2, cp);
break;
OpenPOWER on IntegriCloud