mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Bail out if the fill function failed.
This commit is contained in:
parent
7005ce8a5f
commit
b27acc8dd1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78018
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user