diff --git a/lib/nvmf/conf.c b/lib/nvmf/conf.c index 785d14ddd..2a52daa41 100644 --- a/lib/nvmf/conf.c +++ b/lib/nvmf/conf.c @@ -72,23 +72,14 @@ static int spdk_add_nvmf_discovery_subsystem(void) { struct spdk_nvmf_subsystem *subsystem; - char *name; - name = strdup(SPDK_NVMF_DISCOVERY_NQN); - if (name == NULL) { - SPDK_ERRLOG("strdup ss_group->name error\n"); - return -1; - } - - subsystem = nvmf_create_subsystem(0, name, SPDK_NVMF_SUBTYPE_DISCOVERY, rte_get_master_lcore()); + subsystem = nvmf_create_subsystem(0, SPDK_NVMF_DISCOVERY_NQN, SPDK_NVMF_SUBTYPE_DISCOVERY, + rte_get_master_lcore()); if (subsystem == NULL) { SPDK_ERRLOG("Failed creating discovery nvmf library subsystem\n"); - free(name); return -1; } - free(name); - return 0; }