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:
parent
326786a943
commit
8651c2eb47
@ -366,6 +366,10 @@ spdk_nvmf_subsystem_add_host(struct spdk_nvmf_subsystem *subsystem, const char *
|
|||||||
{
|
{
|
||||||
struct spdk_nvmf_host *host;
|
struct spdk_nvmf_host *host;
|
||||||
|
|
||||||
|
if (!spdk_nvmf_valid_nqn(host_nqn)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
host = calloc(1, sizeof(*host));
|
host = calloc(1, sizeof(*host));
|
||||||
if (!host) {
|
if (!host) {
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user