aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/main.c
diff options
context:
space:
mode:
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>2009-09-05 23:24:49 -0400
committerRoland Dreier <rolandd@cisco.com>2009-09-05 23:24:49 -0400
commit1af92e2a211b0d46ef60ea9f30f989fd7b5725fa (patch)
treeee52c5a1a7fc3e78b0bd1e4c317f98959b4b7ea7 /drivers/net/mlx4/main.c
parentfa0681d2129732027355d6b7083dd8932b9b799d (diff)
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>
Diffstat (limited to 'drivers/net/mlx4/main.c')
-rw-r--r--drivers/net/mlx4/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index 528f89b2cde3..3dd481e77f92 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -789,7 +789,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
789 return 0; 789 return 0;
790 790
791err_close: 791err_close:
792 mlx4_close_hca(dev); 792 mlx4_CLOSE_HCA(dev, 0);
793 793
794err_free_icm: 794err_free_icm:
795 mlx4_free_icms(dev); 795 mlx4_free_icms(dev);