]>
www.infradead.org Git - users/dwmw2/linux.git/commit
net/mlx5: HWS, fixed double-free in error flow of creating SQ
When SQ creation fails, call the appropriate mlx5_core destroy function.
This fixes the following smatch warnings:
divers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_send.c:739
hws_send_ring_open_sq() warn: 'sq->dep_wqe' double freed
hws_send_ring_open_sq() warn: 'sq->wq_ctrl.buf.frags' double freed
hws_send_ring_open_sq() warn: 'sq->wr_priv' double freed
Fixes: 2ca62599aa0b ("net/mlx5: HWS, added send engine and context handling")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/e4ebc227-4b25-49bf-9e4c-14b7ea5c6a07@stanley.mountain/
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>