From 9ffe4413610ea81731462d45f81a30e709fef011 Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Tue, 9 Jul 2024 18:36:17 +0200 Subject: [PATCH] Fix zdb "Memory fault" found on FreeBSD ZTS (#16332) Reason: nvlist_free() tries to free sth. which isn't allocted Solution: init this variable with NULL Closes #16311 Signed-off-by: Tino Reichardt Reviewed-by: Alexander Motin Reviewed-by: Ameer Hamza Reviewed-by: Tony Hutter --- 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';