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) {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to