nvmf/vfio-user: free qpair to fix the memory leak

Change-Id: I92550cfa6857aba471ac1b2afed7e8acef3453d9
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7250
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
This commit is contained in:
Changpeng Liu 2021-03-31 18:26:14 +08:00 committed by Tomasz Zawadzki
parent 3a093d82c3
commit a43a0b7798

View File

@ -719,6 +719,7 @@ destroy_qp(struct nvmf_vfio_user_ctrlr *ctrlr, uint16_t qid)
unmap_qp(qpair);
free(qpair->reqs_internal);
free(qpair);
ctrlr->qp[qid] = NULL;
}