From a43a0b77984da2ff597cc701d547dceb3ce55bf0 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Wed, 31 Mar 2021 18:26:14 +0800 Subject: [PATCH] nvmf/vfio-user: free qpair to fix the memory leak Change-Id: I92550cfa6857aba471ac1b2afed7e8acef3453d9 Signed-off-by: Changpeng Liu Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7250 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: --- lib/nvmf/vfio_user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/nvmf/vfio_user.c b/lib/nvmf/vfio_user.c index 9bddc73c2..dffec4ac0 100644 --- a/lib/nvmf/vfio_user.c +++ b/lib/nvmf/vfio_user.c @@ -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; }