Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 240a9207 authored by Dotan Barak's avatar Dotan Barak Committed by Roland Dreier
Browse files

net/mlx4_core: Free ICM table in case of error



In mlx4_init_icm_table(), free the allocated table if we failed to
allocate memory to its entries.

Signed-off-by: default avatarDotan Barak <dotanb@dev.mellanox.co.il>
Reviewed-by: default avatarYevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 87d4abda
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -413,6 +413,8 @@ int mlx4_init_icm_table(struct mlx4_dev *dev, struct mlx4_icm_table *table,
			mlx4_free_icm(dev, table->icm[i], use_coherent);
		}

	kfree(table->icm);

	return -ENOMEM;
}