rdma-core/0013-cma-Release-allocated-port-array.patch
Chengchang Tang 6f27f67e51 Backport patches from 41.1
Backport patches from rdma-core 41.1.

And bugfix patches reported by #I5Q3S5 has also been included.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
2022-11-06 23:17:09 +08:00

29 lines
806 B
Diff

From 6be317e9e2b894d460c4f3422f349895d475ef8d Mon Sep 17 00:00:00 2001
From: Kirill Martynov <k.martynov@yadro.com>
Date: Mon, 20 Jun 2022 16:29:09 +0300
Subject: cma: Release allocated port array
Fix mem leak for allocated port array
Fixes: 1b9125689fec ("cma: Workaround for rdma_ucm kernel bug")
Signed-off-by: Kirill Martynov <k.martynov@yadro.com>
---
librdmacm/cma.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/librdmacm/cma.c b/librdmacm/cma.c
index 2bde34a..7b924bd 100644
--- a/librdmacm/cma.c
+++ b/librdmacm/cma.c
@@ -304,6 +304,7 @@ static void remove_cma_dev(struct cma_device *cma_dev)
ibv_dealloc_pd(cma_dev->pd);
if (cma_dev->verbs)
ibv_close_device(cma_dev->verbs);
+ free(cma_dev->port);
list_del_from(&cma_dev_list, &cma_dev->entry);
free(cma_dev);
}
--
2.34.1