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:
Kyle Evans 2019-05-31 17:44:22 +00:00
parent 8e9105dbae
commit 9892cc9ad4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=348471

View file

@ -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) {