1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-28 08:02:54 +00:00

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 <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>
This commit is contained in:
Tino Reichardt 2024-07-09 18:36:17 +02:00 committed by GitHub
parent f72e081fbf
commit 9ffe441361
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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';