Skip to content

Commit

Permalink
Fix zdb "Memory fault" found on FreeBSD ZTS (openzfs#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 openzfs#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 authored and ixhamza committed Aug 13, 2024
1 parent 8702780 commit eaee625
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 @@ -9271,7 +9271,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 eaee625

Please sign in to comment.