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

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