diff --git a/lib/nvmf/ctrlr.c b/lib/nvmf/ctrlr.c index df1fdbacf2..a888ab50fc 100644 --- a/lib/nvmf/ctrlr.c +++ b/lib/nvmf/ctrlr.c @@ -2458,6 +2458,8 @@ nvmf_ctrlr_identify_active_ns_list(struct spdk_nvmf_subsystem *subsystem, return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; } + memset(ns_list, 0, sizeof(*ns_list)); + for (ns = spdk_nvmf_subsystem_get_first_ns(subsystem); ns != NULL; ns = spdk_nvmf_subsystem_get_next_ns(subsystem, ns)) { if (ns->opts.nsid <= cmd->nsid) {