From a5fb50f03e26b5299a998f49a1e8d9de42b669f0 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Fri, 3 Jun 2022 14:24:32 -0700 Subject: [PATCH] DLPX-81456 `zpool import` fails assertion (#466) --- lib/libzutil/zutil_import.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libzutil/zutil_import.c b/lib/libzutil/zutil_import.c index 4669069a8662..6626691da586 100644 --- a/lib/libzutil/zutil_import.c +++ b/lib/libzutil/zutil_import.c @@ -1901,7 +1901,8 @@ zpool_find_import_agent(libpc_handle_t *hdl, importargs_t *iarg, nvlist_t *resp = zoa_send_recv_msg(hdl, msg, AGENT_PUBLIC_PROTOCOL_VERSION, ZFS_PUBLIC_SOCKET, NULL); - nvlist_t *pools = fnvlist_lookup_nvlist(resp, "pools"); + nvlist_t *pools = NULL; + (void) nvlist_lookup_nvlist(resp, "pools", &pools); nvpair_t *elem = NULL; while ((elem = nvlist_next_nvpair(pools, elem)) != NULL) {