nvmf: call function spdk_nvmf_valid_nqn to check the host_nqn.

Change-Id: I035fe2538b46d0a19eb00fd829fae9e735c1ded9
Signed-off-by: wenzhong wu <wenzhongx.wu@intel.com>
This commit is contained in:
wenzhong wu 2017-05-13 08:56:32 +08:00
parent 326786a943
commit 8651c2eb47

View File

@ -366,6 +366,10 @@ spdk_nvmf_subsystem_add_host(struct spdk_nvmf_subsystem *subsystem, const char *
{
struct spdk_nvmf_host *host;
if (!spdk_nvmf_valid_nqn(host_nqn)) {
return -1;
}
host = calloc(1, sizeof(*host));
if (!host) {
return -1;