From 596e83fca18ebf726968d262ab4f9c632e7f2714 Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Tue, 9 Jul 2024 10:32:58 +0200 Subject: [PATCH] Fix zdb "Memory fault" found on FreeBSD ZTS Reason: nvlist_free() tries to free sth. which isn't allocted Solution: init this variable with NULL Signed-off-by: Tino Reichardt Closes #16311 --- cmd/zdb/zdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 3a7ef11612..0d2f0b1da5 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -9186,7 +9186,7 @@ main(int argc, char **argv) char *pname = strdup(target); const char *value; nvlist_t *pnvl = NULL; - nvlist_t *vnvl; + nvlist_t *vnvl = NULL; if (strpbrk(pname, "/@") != NULL) *strpbrk(pname, "/@") = '\0';