From: Dotan Barak <[email protected]> In mlx4_init_icm_table, free the allocated table if we failed to allocate memory to its entries.
Signed-off-by: Dotan Barak <[email protected]> Reviewed-by: Yevgeny Petrilin <[email protected]> Signed-off-by: Or Gerlitz <[email protected]> --- drivers/net/ethernet/mellanox/mlx4/icm.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/icm.c b/drivers/net/ethernet/mellanox/mlx4/icm.c index a9ade1c..88b7b3e 100644 --- a/drivers/net/ethernet/mellanox/mlx4/icm.c +++ b/drivers/net/ethernet/mellanox/mlx4/icm.c @@ -413,6 +413,8 @@ err: mlx4_free_icm(dev, table->icm[i], use_coherent); } + kfree(table->icm); + return -ENOMEM; } -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
