From 9ffe4413610ea81731462d45f81a30e709fef011 Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Tue, 9 Jul 2024 18:36:17 +0200 Subject: 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(-) (limited to 'cmd/zdb') diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 3a7ef1161..0d2f0b1da 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'; -- cgit v1.2.3