Skip to content

Commit

Permalink
cma: Release allocated port array
Browse files Browse the repository at this point in the history
[ Upstream commit 7720071 ]

Fix mem leak for allocated port array

Fixes: 1b91256 ("cma: Workaround for rdma_ucm kernel bug")
Signed-off-by: Kirill Martynov <k.martynov@yadro.com>
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
  • Loading branch information
Kirill Martynov authored and nmorey committed Jun 30, 2022
1 parent d01d350 commit 7d69e37
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions librdmacm/cma.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7d69e37

Please sign in to comment.