Commit 08db2cf5 authored by Raed Salem's avatar Raed Salem Committed by Saeed Mahameed
Browse files

net/mlx5: IPsec, fix memory leak at mlx5_fpga_ipsec_delete_sa_ctx

SA context is allocated at mlx5_fpga_ipsec_create_sa_ctx,
however the counterpart mlx5_fpga_ipsec_delete_sa_ctx function
nullifies sa_ctx pointer without freeing the memory allocated,
hence the memory leak.

Fix by free SA context when the SA is released.

Fixes: d6c4f029

 ("net/mlx5: Refactor accel IPSec code")
Signed-off-by: default avatarRaed Salem <>
Reviewed-by: default avatarBoris Pismenny <>
Signed-off-by: default avatarSaeed Mahameed <>
parent 0dc2c534
......@@ -850,6 +850,7 @@ void mlx5_fpga_ipsec_delete_sa_ctx(void *context)
if (!--fpga_xfrm->num_rules) {
fpga_xfrm->sa_ctx = NULL;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment