mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
mlx4_core: Avoid double free_icms
On the error path of mlx4_init_hca(), mlx4_close_hca() is called, followed by mlx4_free_icms() and mlx4_UNMAP_FA(). But both those functions are also called from mlx4_close_hca(), which leads to a double free. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
fa0681d212
commit
1af92e2a21
1 changed files with 1 additions and 1 deletions
|
@ -789,7 +789,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_close:
|
err_close:
|
||||||
mlx4_close_hca(dev);
|
mlx4_CLOSE_HCA(dev, 0);
|
||||||
|
|
||||||
err_free_icm:
|
err_free_icm:
|
||||||
mlx4_free_icms(dev);
|
mlx4_free_icms(dev);
|
||||||
|
|
Loading…
Reference in a new issue