Skip to content
Commit d543b649 authored by Zhengchao Shao's avatar Zhengchao Shao Committed by Saeed Mahameed
Browse files

net/mlx5e: fix memory leak in mlx5e_ptp_open



When kvzalloc_node or kvzalloc failed in mlx5e_ptp_open, the memory
pointed by "c" or "cparams" is not freed, which can lead to a memory
leak. Fix by freeing the array in the error path.

Fixes: 145e5637 ("net/mlx5e: Add TX PTP port object support")
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: default avatarRahul Rameshbabu <rrameshbabu@nvidia.com>
Reviewed-by: default avatarGal Pressman <gal@nvidia.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 3250affd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment