Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44f2e99e authored by Bodong Wang's avatar Bodong Wang Committed by Doug Ledford
Browse files

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: 1cbe6fc8 ("IB/mlx5: Add support for CQE compressing")
Signed-off-by: default avatarBodong Wang <bodong@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 00b7c2ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);