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

Reply via email to