summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mlx5
diff options
context:
space:
mode:
authorBodong Wang <bodong@mellanox.com>2017-03-29 06:12:14 +0300
committerDoug Ledford <dledford@redhat.com>2017-04-21 12:26:05 -0400
commit44f2e99ecdb76cb91293dd822fbe3952b8db5345 (patch)
treee941ee235fc0a9e06541e5f2bc9c89d809c8a503 /drivers/infiniband/hw/mlx5
parent00b7c2abb6a25437be472b9402feb90ab32798ae (diff)
downloadlinux-rt-44f2e99ecdb76cb91293dd822fbe3952b8db5345.tar.gz
IB/mlx5: Fix wrong use of kfree at bad flow in create_cq_user
The kfree was called to free cqb, while it should free *cqb. Fixes: 1cbe6fc86ccf ("IB/mlx5: Add support for CQE compressing") Signed-off-by: Bodong Wang <bodong@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5')
-rw-r--r--drivers/infiniband/hw/mlx5/cq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/cq.c b/drivers/infiniband/hw/mlx5/cq.c
index 31803b367104..5a31cec947fa 100644
--- a/drivers/infiniband/hw/mlx5/cq.c
+++ b/drivers/infiniband/hw/mlx5/cq.c
@@ -818,7 +818,7 @@ static int create_cq_user(struct mlx5_ib_dev *dev, struct ib_udata *udata,
return 0;
err_cqb:
- kfree(cqb);
+ kfree(*cqb);
err_db:
mlx5_ib_db_unmap_user(to_mucontext(context), &cq->db);