diff options
author | phk <phk@FreeBSD.org> | 2002-09-28 08:16:50 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-09-28 08:16:50 +0000 |
commit | 19335151f1c66b543ec2e24313629b159306a852 (patch) | |
tree | c8c7c287f9dc2fabc0e48cfa23613b2f04bdc4aa /sys/geom | |
parent | 79f7c6df9ad682ea7f68fea69447b8aa16626f89 (diff) | |
download | FreeBSD-src-19335151f1c66b543ec2e24313629b159306a852.zip FreeBSD-src-19335151f1c66b543ec2e24313629b159306a852.tar.gz |
First confirmed kill from my Flexelint license: Check return value
of g_clone_bio().
Detected by: http://www.gimpel.com/html/flex.htm
Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_slice.c | 4 |
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; |