/* Read the free space block. */
        error = xfs_dir3_leaf_read(sc->tp, sc->ip, lblk, &bp);
        if (!xchk_fblock_process_error(sc, XFS_DATA_FORK, lblk, &error))
-               goto out;
+               return error;
        xchk_buffer_recheck(sc, bp);
 
        leaf = bp->b_addr;
                xchk_directory_check_freesp(sc, lblk, dbp, best);
                xfs_trans_brelse(sc->tp, dbp);
                if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
-                       goto out;
+                       break;
        }
 out:
+       xfs_trans_brelse(sc->tp, bp);
        return error;
 }
 
        /* Read the free space block */
        error = xfs_dir2_free_read(sc->tp, sc->ip, lblk, &bp);
        if (!xchk_fblock_process_error(sc, XFS_DATA_FORK, lblk, &error))
-               goto out;
+               return error;
        xchk_buffer_recheck(sc, bp);
 
        if (xfs_sb_version_hascrc(&sc->mp->m_sb)) {
                                0, &dbp);
                if (!xchk_fblock_process_error(sc, XFS_DATA_FORK, lblk,
                                &error))
-                       break;
+                       goto out;
                xchk_directory_check_freesp(sc, lblk, dbp, best);
                xfs_trans_brelse(sc->tp, dbp);
        }
        if (freehdr.nused + stale != freehdr.nvalid)
                xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, lblk);
 out:
+       xfs_trans_brelse(sc->tp, bp);
        return error;
 }