mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 22:24:09 +08:00
net/mlx5e: MACsec, fix add Rx security association (SA) rule memory leak
Currently MACsec's add Rx SA flow steering (fs) rule routine
uses a spec object which is dynamically allocated and do
not free it upon leaving. The above led to a memory leak.
Fix by freeing dynamically allocated objects.
Fixes: 3b20949cb2
("net/mlx5e: Add MACsec RX steering rules")
Signed-off-by: Emeel Hakim <ehakim@nvidia.com>
Reviewed-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
ceb51b273e
commit
194cc051e2
@ -1209,6 +1209,7 @@ macsec_fs_rx_add_rule(struct mlx5e_macsec_fs *macsec_fs,
|
||||
rx_rule->rule[1] = rule;
|
||||
}
|
||||
|
||||
kvfree(spec);
|
||||
return macsec_rule;
|
||||
|
||||
err:
|
||||
|
Loading…
Reference in New Issue
Block a user