nvme: destruct the ctrlr when failing to construct it
Change-Id: Idbd1d4ea8c47d78daf0cceb3a4eda1afe4d688a2 Signed-off-by: GangCao <gang.cao@intel.com>
This commit is contained in:
parent
11381f3b3c
commit
a7399d6bf7
@ -324,7 +324,7 @@ static struct spdk_nvme_ctrlr *nvme_pcie_ctrlr_construct(void *devhandle)
|
||||
|
||||
rc = nvme_ctrlr_construct(&pctrlr->ctrlr);
|
||||
if (rc != 0) {
|
||||
spdk_free(pctrlr);
|
||||
nvme_ctrlr_destruct(&pctrlr->ctrlr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user