summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2001-06-10 21:39:01 +0000
committerdes <des@FreeBSD.org>2001-06-10 21:39:01 +0000
commit169656d24e7b5f1eea901eeacdf2e4ce62f92b0c (patch)
tree1ceb53837476d0f517afe1f7aeec40ba3947c02f /sys/fs
parent2002923bda266a13ddb6a6c5e014d885e6ab77f1 (diff)
downloadFreeBSD-src-169656d24e7b5f1eea901eeacdf2e4ce62f92b0c.zip
FreeBSD-src-169656d24e7b5f1eea901eeacdf2e4ce62f92b0c.tar.gz
Bail out if the fill function failed.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/pseudofs/pseudofs_vnops.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c
index 473b414..f317025 100644
--- a/sys/fs/pseudofs/pseudofs_vnops.c
+++ b/sys/fs/pseudofs/pseudofs_vnops.c
@@ -233,6 +233,11 @@ pfs_read(struct vop_read_args *va)
if (proc != NULL)
PRELE(proc);
+
+ if (error) {
+ sbuf_delete(sb);
+ return (error);
+ }
/* XXX we should possibly detect and handle overflows */
sbuf_finish(sb);
@@ -391,6 +396,11 @@ pfs_readlink(struct vop_readlink_args *va)
if (proc != NULL)
PRELE(proc);
+ if (error) {
+ sbuf_delete(&sb);
+ return (error);
+ }
+
/* XXX we should detect and handle overflows */
sbuf_finish(&sb);
ps = sbuf_data(&sb) + uio->uio_offset;
OpenPOWER on IntegriCloud