nvme: free associated memory when deleting the IO queue pair

Change-Id: Ibc139c5fd2e0ef72b6dbd5a8416aec916759430f
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Changpeng Liu 2016-11-23 10:38:45 +08:00 committed by Jim Harris
parent 2bfb991e42
commit 277ca8ddd0
2 changed files with 1 additions and 2 deletions

View File

@ -1190,8 +1190,6 @@ nvme_ctrlr_destruct(struct spdk_nvme_ctrlr *ctrlr)
while (!TAILQ_EMPTY(&ctrlr->active_io_qpairs)) {
struct spdk_nvme_qpair *qpair = TAILQ_FIRST(&ctrlr->active_io_qpairs);
nvme_qpair_destroy(qpair);
spdk_nvme_ctrlr_free_io_qpair(qpair);
}

View File

@ -1265,6 +1265,7 @@ nvme_pcie_ctrlr_delete_io_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_
return -1;
}
nvme_qpair_destroy(qpair);
spdk_free(pqpair);
return 0;