summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Vesker <valex@mellanox.com>2019-10-29 13:28:17 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2019-11-06 14:03:54 -0800
commit22f83150f03e119f61f4d00d6884639871ba6859 (patch)
treee90c465b3ebf17126e22e8d5e01faf7c51f37f49 /drivers
parentf382b0df6946d48fae80a2201ccff43b41382099 (diff)
downloadlinux-22f83150f03e119f61f4d00d6884639871ba6859.tar.bz2
net/mlx5: DR, Fix memory leak in modify action destroy
The rewrite data was no freed. Fixes: 9db810ed2d37 ("net/mlx5: DR, Expose steering action functionality") Signed-off-by: Alex Vesker <valex@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
index b74b7d0f6590..004c56c2fc0c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
@@ -1577,6 +1577,7 @@ int mlx5dr_action_destroy(struct mlx5dr_action *action)
break;
case DR_ACTION_TYP_MODIFY_HDR:
mlx5dr_icm_free_chunk(action->rewrite.chunk);
+ kfree(action->rewrite.data);
refcount_dec(&action->rewrite.dmn->refcount);
break;
default: