mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
stand: zfs: Free bouncebuf on error path in vdev_read
r344226 inadvertently added this path in which we return from failure on an lseek and do not free bouncebuf on the way out. MFC after: 3 days
This commit is contained in:
parent
8e9105dbae
commit
9892cc9ad4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=348471
|
@ -425,8 +425,10 @@ vdev_read(vdev_t *vdev, void *priv, off_t offset, void *buf, size_t bytes)
|
|||
}
|
||||
}
|
||||
|
||||
if (lseek(fd, start_sec * secsz, SEEK_SET) == -1)
|
||||
return (errno);
|
||||
if (lseek(fd, start_sec * secsz, SEEK_SET) == -1) {
|
||||
ret = errno;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Partial data return from first sector */
|
||||
if (head > 0) {
|
||||
|
|
Loading…
Reference in a new issue