net/mlx5: DR, Fix memory leak in modify action destroy

The rewrite data was no freed.

Fixes: 9db810ed2d ("net/mlx5: DR, Expose steering action functionality")
Signed-off-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
Alex Vesker 2019-10-29 13:28:17 +02:00 committed by Saeed Mahameed
parent f382b0df69
commit 22f83150f0
1 changed files with 1 additions and 0 deletions

View File

@ -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: