]> granicus.if.org Git - zfs/commitdiff
Zero struct for zdb dump_block_stats
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 22 Jun 2010 04:22:46 +0000 (21:22 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 28 Jun 2010 17:48:24 +0000 (10:48 -0700)
Accidentally dropped the zeroing of this structure in the
gcc-missing-braces topic branch which was causing a fall positive
space leak in ztest.  Ensure the structure is zero'ed before use.

cmd/zdb/zdb.c

index 1f4fcfef7af9738038b3c6a6aee2006d6b638044..82940712dd4df22ba227522c588aab57f71a2ccf 100644 (file)
@@ -2179,6 +2179,7 @@ dump_block_stats(spa_t *spa)
         * it's not part of any space map) is a double allocation,
         * reference to a freed block, or an unclaimed log block.
         */
+       bzero(&zcb, sizeof(zdb_cb_t));
        zdb_leak_init(spa, &zcb);
 
        /*