From d960beca61b3c5ede8eb595ceb091666e0d4a17c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 26 Apr 2023 08:43:39 -0700 Subject: [PATCH] zdb: Fix minor memory leak Commit 6b6aaf6dc2e65c63c74fbd7840c14627e9a91ce2 introduced a small memory leak in zdb. This was detected by the LeakSanitizer and was causing all ztest runs to fail. Reviewed-by: Igor Kozhukhov Reviewed-by: Rich Ercolani Signed-off-by: Brian Behlendorf Closes #14796 --- cmd/zdb/zdb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 64ec3eb0028c..ec5d1acacf85 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -6940,6 +6940,8 @@ dump_block_stats(spa_t *spa) if (dump_opt['b'] >= 2) { dump_size_histograms(zcb); } + + umem_free(mdstats, sizeof (zfs_blkstat_t)); } (void) printf("\n");