zdb: Fix minor memory leak

Commit 6b6aaf6dc2 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 <igor@dilos.org>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #14796
This commit is contained in:
Brian Behlendorf 2023-04-26 08:43:39 -07:00 committed by GitHub
parent 0e8a42bbee
commit d960beca61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");