]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix memory leak in mlx5_events_init
authorMoshe Shemesh <moshe@mellanox.com>
Wed, 29 Apr 2020 20:56:58 +0000 (23:56 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Sat, 23 May 2020 00:28:46 +0000 (17:28 -0700)
commitc7c0faceb70b482d25847e766928d4d29f491653
tree89c396e75f1b1352ff8be3e1217cb3506f176ddc
parent757ff536ad091405874863280174b50e376378b5
net/mlx5: Fix memory leak in mlx5_events_init

Fix memory leak in mlx5_events_init(), in case
create_single_thread_workqueue() fails, events
struct should be freed.

Fixes: 32fe04261515 ("net/mlx5: Handle event of power detection in the PCIE slot")
Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/events.c