diff options
author | Zhengchao Shao <[email protected]> | 2023-06-30 09:49:03 +0800 |
---|---|---|
committer | Saeed Mahameed <[email protected]> | 2023-07-05 10:57:03 -0700 |
commit | d543b649ffe58a0cb4b6948b3305069c5980a1fa (patch) | |
tree | 133c86598411c96ac1f0f1801e37e15d6c1fc89b /drivers/fpga/fpga-mgr.c | |
parent | 3250affdc658557a41df9c5fb567723e421f8bf2 (diff) |
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: 145e5637d941 ("net/mlx5e: Add TX PTP port object support")
Signed-off-by: Zhengchao Shao <[email protected]>
Reviewed-by: Rahul Rameshbabu <[email protected]>
Reviewed-by: Gal Pressman <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions