app/nvmf_tgt: free the allocated memory for the listeners
Change-Id: Icfd6ed4e4a00b28ad882e1fde0652025581760f9 Signed-off-by: GangCao <gang.cao@intel.com>
This commit is contained in:
parent
ed61bf79fb
commit
3a74e273fc
@ -396,11 +396,18 @@ spdk_nvmf_parse_subsystem(struct spdk_conf_section *sp)
|
|||||||
num_devs++;
|
num_devs++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return spdk_nvmf_construct_subsystem(nqn, mode_str, lcore,
|
ret = spdk_nvmf_construct_subsystem(nqn, mode_str, lcore,
|
||||||
num_listen_addrs, listen_addrs,
|
num_listen_addrs, listen_addrs,
|
||||||
num_hosts, hosts,
|
num_hosts, hosts,
|
||||||
bdf, sn,
|
bdf, sn,
|
||||||
num_devs, devs);
|
num_devs, devs);
|
||||||
|
|
||||||
|
for (i = 0; i < num_listen_addrs; i++) {
|
||||||
|
free(listen_addrs[i].traddr);
|
||||||
|
free(listen_addrs[i].trsvcid);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user