]> 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)
commit697249ae70e9593b009234974388e3ef24b4e2e7
tree89c396e75f1b1352ff8be3e1217cb3506f176ddc
parent44818e99f0ae236ff4605075f17b311afaccc3d3
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: ae7bed299fc4 ("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