Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 May 2019 17:44:22 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348471 - head/stand/libsa/zfs
Message-ID:  <201905311744.x4VHiMDQ066102@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Fri May 31 17:44:22 2019
New Revision: 348471
URL: https://svnweb.freebsd.org/changeset/base/348471

Log:
  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

Modified:
  head/stand/libsa/zfs/zfs.c

Modified: head/stand/libsa/zfs/zfs.c
==============================================================================
--- head/stand/libsa/zfs/zfs.c	Fri May 31 17:18:09 2019	(r348470)
+++ head/stand/libsa/zfs/zfs.c	Fri May 31 17:44:22 2019	(r348471)
@@ -425,8 +425,10 @@ vdev_read(vdev_t *vdev, void *priv, off_t offset, void
 		}
 	}
 
-	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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905311744.x4VHiMDQ066102>