Skip to content

Commit

Permalink
Fix zdb "Memory fault" found on FreeBSD ZTS (#16332)
Browse files Browse the repository at this point in the history
Reason: nvlist_free() tries to free sth. which isn't allocted
Solution: init this variable with NULL

Closes #16311
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
  • Loading branch information
mcmilk committed Jul 9, 2024
1 parent f72e081 commit 9ffe441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 9ffe441

Please sign in to comment.