Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2020 17:05:44 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363373 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <202007201705.06KH5iE2016333@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Mon Jul 20 17:05:44 2020
New Revision: 363373
URL: https://svnweb.freebsd.org/changeset/base/363373

Log:
  Fix a memory leak in dsl_scan_visitbp().
  
  This should be triggered only if arc_read() fails, i.e., quite rarely.
  The same logic is already present in OpenZFS.
  
  PR:		247445
  Submitted by:	jdolecek@NetBSD.org
  MFC after:	1 week

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c	Mon Jul 20 17:04:25 2020	(r363372)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c	Mon Jul 20 17:05:44 2020	(r363373)
@@ -1789,7 +1789,7 @@ dsl_scan_visitbp(blkptr_t *bp, const zbookmark_phys_t 
 	*bp_toread = *bp;
 
 	if (dsl_scan_recurse(scn, ds, ostype, dnp, bp_toread, zb, tx) != 0)
-		return;
+		goto out;
 
 	/*
 	 * If dsl_scan_ddt() has already visited this block, it will have



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