Commit 47a357de authored by Denis Efremov's avatar Denis Efremov Committed by Saeed Mahameed

net/mlx5: DR, Fix freeing in dr_create_rc_qp()

Variable "in" in dr_create_rc_qp() is allocated with kvzalloc() and
should be freed with kvfree().

Fixes: 297ccceb ("net/mlx5: DR, Expose an internal API to issue RDMA operations")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent b6e0b6be
...@@ -179,7 +179,7 @@ static struct mlx5dr_qp *dr_create_rc_qp(struct mlx5_core_dev *mdev, ...@@ -179,7 +179,7 @@ static struct mlx5dr_qp *dr_create_rc_qp(struct mlx5_core_dev *mdev,
MLX5_SET(create_qp_in, in, opcode, MLX5_CMD_OP_CREATE_QP); MLX5_SET(create_qp_in, in, opcode, MLX5_CMD_OP_CREATE_QP);
err = mlx5_cmd_exec(mdev, in, inlen, out, sizeof(out)); err = mlx5_cmd_exec(mdev, in, inlen, out, sizeof(out));
dr_qp->qpn = MLX5_GET(create_qp_out, out, qpn); dr_qp->qpn = MLX5_GET(create_qp_out, out, qpn);
kfree(in); kvfree(in);
if (err) if (err)
goto err_in; goto err_in;
dr_qp->uar = attr->uar; dr_qp->uar = attr->uar;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment