From 5b02d6c0841a47b3a2167bfbd04c9223f77dcf8a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 21 Jun 2010 21:22:46 -0700 Subject: [PATCH] Zero struct for zdb dump_block_stats 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 1f4fcfef7a..82940712dd 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -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); /*