Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jul 2019 01:47:21 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r350342 - in stable: 11/stand/libsa/zfs 12/stand/libsa/zfs
Message-ID:  <201907260147.x6Q1lL3G081204@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Fri Jul 26 01:47:20 2019
New Revision: 350342
URL: https://svnweb.freebsd.org/changeset/base/350342

Log:
  MFC r348471: 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.

Modified:
  stable/12/stand/libsa/zfs/zfs.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/stand/libsa/zfs/zfs.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/stand/libsa/zfs/zfs.c
==============================================================================
--- stable/12/stand/libsa/zfs/zfs.c	Fri Jul 26 01:45:00 2019	(r350341)
+++ stable/12/stand/libsa/zfs/zfs.c	Fri Jul 26 01:47:20 2019	(r350342)
@@ -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?201907260147.x6Q1lL3G081204>